photomix/config/routes.rb
2010-10-11 16:03:34 +02:00

58 lines
No EOL
1.2 KiB
Ruby

ActionController::Routing::Routes.draw do
resources :account, :as => "users"
match "login", :to => "user_sessions#new", :as => :login
match "authenticate", :to => "user_sessions#create", :as => :authenticate
match "logout", :to => "user_sessions#destroy", :as => :logout
resources :photos do
collection do
get :untouched
post :edit_multiple
put :update_multiple
get :upload
get :scan
end
end
resources :albums do
collection do
get :untouched
end
resources :tags do
resources :photos do
collection do
get :untouched
get :upload
get :edit_multiple
end
end
end
resources :photos do
collection do
get :untouched
get :upload
get :edit_multiple
end
end
end
resources :collections do
resources :albums do
resources :photos do
collection do
get :untouched
get :upload
get :edit_multiple
end
end
end
end
resources :tags, :shallow => true do
resources :photos
resources :albums
end
resources :users, :to => "admin/users#index"
root :to => "collections#index"
end