Created
June 19, 2009 00:39
-
-
Save ng/132323 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# we have | |
admin.resources :meals do |meal| | |
meal.resources :preparation_steps | |
meal.resources :preparation_tools, :collection => {:associate => :post}, | |
:member => {:disassociate => :delete} | |
end | |
# i've added a "sort" method to the preparation_steps controller, and need | |
# to access /admin/meals/:meal_id/preparation_steps/:preparation_step_id/sort | |
# this is wrong but was the thing that would generate routes that were reasonable | |
admin.resources :meals do |meal| | |
meal.resources :preparation_steps do |step| | |
step.resource :sort, :controller => "preparation_tools", :action => "sort" | |
end | |
meal.resources :preparation_tools, :collection => {:associate => :post}, | |
:member => {:disassociate => :delete} | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment