2009-05-22 14:13:46 +02:00
|
|
|
ActionController::Routing::Routes.draw do |map|
|
2009-05-22 16:14:07 +02:00
|
|
|
map.resource :account, :controller => "users"
|
|
|
|
map.login "login", :controller => "user_sessions", :action => "new"
|
2009-06-09 00:30:22 +02:00
|
|
|
map.authenticate "authenticate", :controller => "user_sessions", :action => "create"
|
2009-05-22 16:14:07 +02:00
|
|
|
map.logout "logout", :controller => "user_sessions", :action => "destroy"
|
2009-06-02 00:08:57 +02:00
|
|
|
|
2009-06-11 13:05:09 +02:00
|
|
|
map.resources :photos, :collection => { :untouched => :get, :edit_multiple => :post, :update_multiple => :put, :upload => :get }
|
|
|
|
map.resources :albums, :collection => { :untouched => :get, } do |album|
|
2009-06-28 18:02:19 +02:00
|
|
|
album.resources :tags do |tag|
|
|
|
|
tag.resources :photos, :collection => { :untouched => :get, :upload => :get, :edit_multiple => :get }
|
|
|
|
end
|
2009-06-11 13:05:09 +02:00
|
|
|
album.resources :photos, :collection => { :untouched => :get, :upload => :get, :edit_multiple => :get }
|
2009-06-09 00:30:22 +02:00
|
|
|
end
|
2009-06-11 13:05:09 +02:00
|
|
|
map.resources :collections do |collection|
|
|
|
|
collection.resources :albums do |album|
|
2009-06-18 15:38:37 +02:00
|
|
|
album.resources :photos, :collection => { :untouched => :get }
|
2009-06-11 13:05:09 +02:00
|
|
|
#album.resources :photos, :collection => { :untouched => :get, :upload => :get, :edit_multiple => :get }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2009-06-10 01:22:48 +02:00
|
|
|
map.resources :tags, :has_many => [ :photos, :albums ], :shallow => true
|
2009-05-22 16:14:07 +02:00
|
|
|
|
2009-06-09 00:30:22 +02:00
|
|
|
map.resources :users, :controller => "admin/users"
|
2009-06-02 00:08:57 +02:00
|
|
|
|
2009-06-03 01:33:39 +02:00
|
|
|
map.root :controller => "collections"
|
2009-05-22 16:14:07 +02:00
|
|
|
|
2009-06-11 13:05:09 +02:00
|
|
|
end
|