photomix/config/routes.rb
Espen Antonsen eb641647b9 scan
2009-07-29 14:55:43 +02:00

27 lines
1.3 KiB
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, :scan => :get }
map.resources :albums, :collection => { :untouched => :get, } do |album|
album.resources :tags do |tag|
tag.resources :photos, :collection => { :untouched => :get, :upload => :get, :edit_multiple => :get }
end
album.resources :photos, :collection => { :untouched => :get, :upload => :get, :edit_multiple => :get }
end
map.resources :collections do |collection|
collection.resources :albums do |album|
album.resources :photos, :collection => { :untouched => :get }
#album.resources :photos, :collection => { :untouched => :get, :upload => :get, :edit_multiple => :get }
end
end
map.resources :tags, :has_many => [ :photos, :albums ], :shallow => true
map.resources :users, :controller => "admin/users"
map.root :controller => "collections"
end