photomix/config/routes.rb
2011-04-11 17:13:10 +08:00

58 lines
1.2 KiB
Ruby

Balder::Application.routes.draw do
resource :account, :controller => :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, :controller => "admin/users"
root :to => "collections#index"
end