2008-10-01 02:19:35 -04:00
|
|
|
Merb.logger.info("Compiling routes...")
|
|
|
|
Merb::Router.prepare do |r|
|
2008-10-11 18:36:01 -04:00
|
|
|
# custom routes for specific thingeys
|
|
|
|
r.match('/').to(:controller => 'home', :action => 'index')
|
|
|
|
r.match('/acceptable_use').to(:controller => 'home', :action => 'acceptable_use')
|
|
|
|
r.match('/disclaimer').to(:controller => 'home', :action => 'disclaimer')
|
2008-10-11 04:22:58 -04:00
|
|
|
r.match('/hall_of_fame').to(:controller => 'home', :action => 'hall_of_fame')
|
2008-10-17 04:53:38 -04:00
|
|
|
r.match('/photos/by_email').to(:controller => 'photos', :action => 'by_email')
|
|
|
|
r.match('/photos/by_hash/:id').to(:controller => 'photos', :action => 'by_hash')
|
2008-10-11 04:22:58 -04:00
|
|
|
|
2008-10-11 18:36:01 -04:00
|
|
|
# restful things
|
2008-10-01 02:19:35 -04:00
|
|
|
r.resources :sessions
|
|
|
|
r.resources :users
|
|
|
|
r.resources :votes
|
|
|
|
r.resources :favorites
|
2008-10-15 02:31:50 -04:00
|
|
|
r.resources :photos, :member => {
|
|
|
|
:thumbnail => :get,
|
|
|
|
:flag => :get,
|
|
|
|
:approve => :get
|
|
|
|
}, :collection => {
|
|
|
|
:moderate => :get
|
|
|
|
}
|
2008-10-01 02:19:35 -04:00
|
|
|
end
|