Skip to content

Instantly share code, notes, and snippets.

@deadprogram
Created November 4, 2008 19:30
Show Gist options
  • Save deadprogram/22192 to your computer and use it in GitHub Desktop.
Save deadprogram/22192 to your computer and use it in GitHub Desktop.
# the main restful routes for the application
map.resources :grownups, :member => { :thumbnail => :get, :info => :get } do |grownups|
grownups.resources :kids, :member => { :set_name => :post,
:edit_daily_time_limits => :get,
:update_daily_time_limits => :put } do |kids|
kids.resources :page_requests, :member => { :unlock => :post,
:complete_unlock => :post,
:get_time_limit => :get,
:set_time_limit => :post }
kids.resources :time_limits
kids.resources :subscriptions, :controller => :kid_subscriptions
end
grownups.resources :lists, :member => { :set_name => :post } do |lists|
lists.resources :list_entries, :member => { :set_title => :post,
:set_site => :post,
:set_tags => :post,
:get_tags => :get,
:get_tags_icon => :post },
:collection => {:get_tags_list => :post}
lists.resources :contributors, :member => { :allow => :put, :revoke => :put }
end
grownups.resources :subscriptions, :member => { :contribute => :put }
grownups.resources :pictures
grownups.resources :billings, :collection => { :paypal_checkout => :get,
:paypal_confirm => :get,
:paypal_error => :get,
:paypal_complete => :post }
grownups.resources :blockings
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment