search for: hardways_url

Displaying 1 result from an estimated 1 matches for "hardways_url".

2008 Jan 26
0
RSpec and resource_controller plugin
...format.xml { render :xml => @hardway.errors, :status => :unprocessable_entity } end end end # DELETE /hardways/1 # DELETE /hardways/1.xml def destroy @hardway = Hardway.find(params[:id]) @hardway.destroy respond_to do |format| format.html { redirect_to(hardways_url) } format.xml { head :ok } end end end To this: class EasywaysController < ResourceController::Base end And the helpers make it dead easy to use these resource controllers polymorphically (i.e. with multiple parent resources using for example AR polymorphic associations) or in bo...