[Rails] Re: Nested Resources and Routes

2009-02-25 Thread Sahil Dave
On Feb 25, 11:23 pm, Richard Aday wrote: > You need to change the way you reference orders so that you scope an order > within a deal. > thank for the suggestion Richard.. but i managed to do it by adding an :except clause to the before filter to work on only new and edit --~--~-~--~--

[Rails] Re: Nested Resources and Routes

2009-02-25 Thread Richard Aday
You need to change the way you reference orders so that you scope an order within a deal. Give this a shot and let me know if it works: order_controller.rb: Index action: @order = @deal.orders.find(:all) Show action: @order = @deal.orders.find(params[:id]) New action: @order = @deal.orders.new