photomix/config/routes.rb
2009-06-09 00:30:22 +02:00

20 lines
842 B
Ruby

ActionController::Routing::Routes.draw do |map|
map.resource :account, :controller => "users"
map.login "login", :controller => "user_sessions", :action => "new"
map.authenticate "authenticate", :controller => "user_sessions", :action => "create"
map.logout "logout", :controller => "user_sessions", :action => "destroy"
map.resources :photos,
:collection => { :untouched => :get, :edit_multiple => :post, :update_multiple => :put, :upload => :get }
map.resources :albums, :collection => { :untouched => :get} do |album|
album.resources :photos, :collection => { :untouched => :get, :upload => :get, :edit_multiple => :get }
end
map.resources :collections
map.resources :tags, :has_many => [ :photos, :albums ]
map.resources :users, :controller => "admin/users"
map.root :controller => "collections"
end