Nested Resource - How to pass needed keys, and attribute to update?
- by Jason B
My nested resources are working for form_for updates, but I have a few toggles that I need to setup to change a status field. So I am using link_to, and accessing the url helper.
link_to "toggle", edit_project_expense_path(@project[:id],expense_item[:id])
routes.rb
resources :projects do
resources :expenses
end
match '/submit_expense/:id' => 'expenses#submit_expense', :as => 'submit_expense'
rake routes
edit_project_expense GET /projects/:project_id/expenses/:id/edit(.:format) expenses#edit
My question is: How can I also send along :approval_status = "1", with my link_to?