| Module | Facebooker::Rails::Routing::MapperExtensions |
| In: |
lib/facebooker/rails/routing.rb
|
Generates pseudo-resource routes. Since everything is a POST, routes can‘t be identified using HTTP verbs. Therefore, the action is appended to the beginning of each named route, except for index.
Example:
map.facebook_resources :profiles
Generates the following routes:
new_profile POST /profiles/new {:controller=>"profiles", :action=>"new"}
profiles POST /profiles/index {:controller=>"profiles", :action=>"index"}
show_profile POST /profiles/:id/show {:controller=>"profiles", :action=>"show"}
create_profile POST /profiles/create {:controller=>"profiles", :action=>"create"}
edit_profile POST /profiles/:id/edit {:controller=>"profiles", :action=>"edit"}
update_profile POST /profiles/:id/update {:controller=>"profiles", :action=>"update"}
destroy_profile POST /profiles/:id/destroy {:controller=>"profiles", :action=>"destroy"}