i have some nested resources like, a deal has_many :orders and has_one
:invoice
i am using nested routing for these. so the urls are like:
deals_url
deal_orders_url
deal_invoice_url
and others for the whole CRUD
although everything is working perfectly, the updates for a nested
resource
are stuck. e.g. the edit page for an order comes up, buts submitting it
gives me an error:
Couldn’t find Order without an ID
app/controllers/duties_controller.rb:92:in `get_order’
i have created a before_filter :get_deal
def get_deal @deal = Deal.find(params[:deal_id])
end
do i need to change something in my edit/update actions?? right now they
are
default ones generated after scaffolding.