photomix/config/routes.rb

24 lines
1 KiB
Ruby
Raw Normal View History

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|
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|
album.resources :photos
#album.resources :photos, :collection => { :untouched => :get, :upload => :get, :edit_multiple => :get }
end
end
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