Skip to content

Instantly share code, notes, and snippets.

@rolfb
Created June 18, 2010 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rolfb/ca9301d1ff00acb3c5c0 to your computer and use it in GitHub Desktop.
Save rolfb/ca9301d1ff00acb3c5c0 to your computer and use it in GitHub Desktop.
resources :sections do
resources :documents
member do
match "add_document/:document_id(.:format)" => "sections#add_document", :as => :add_document, :conditions => { :method => :post }
match "remove_document/:document_id(.:format)" => "sections#remove_document", :as => :remove_document, :conditions => { :method => :post }
end
end
resources :steps do
resources :substeps
resources :documents
member do
match "add_document/:document_id(.:format)" => "steps#add_document", :as => :add_document, :conditions => { :method => :post },
match "remove_document/:document_id(.:format)" => "steps#remove_document", :as => :remove_document, :conditions => { :method => :post }
end
collection do
post :sort
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment