Created
July 23, 2012 05:29
-
-
Save takuyan/3162077 to your computer and use it in GitHub Desktop.
http://proofoflife.me のroutes.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Life::Application.routes.draw do | |
scope ":locale", locale: /en|ja/ do | |
root to: "main#index" | |
resources :provider_users, only: [:destroy] | |
resources :contacts | |
resources :messages | |
resources :recipients, only: [:create, :destroy] do | |
collection do | |
get :search | |
end | |
end | |
devise_for :users, controllers: { omniauth_callbacks: "users/omniauth_callbacks" } | |
resource :user, only: [:show] do | |
member do | |
post :update_last_confirm_date | |
get :proof | |
end | |
end | |
match "/about" => "main#about" | |
match "/faqs" => "main#faqs" | |
match "/privacy" => "main#privacy" | |
match "/terms" => "main#terms" | |
match "/home" => "home#index", as: "home" | |
match "/home/tutorial" => "home#tutorial", as: "tutorial_home" | |
match "/home/watch" => "home#watch", as: "watch_home" | |
match "/home/todos" => "home#todos", as: "todos_home" | |
match "/home/mail" => "home#mail", as: "mail_home" | |
match "/home/send_mail" => "home#send_mail", as: "send_mail_home" | |
match "/user/proof/:proof_token" => "users#proof", proof_token: nil, as: :proof | |
end | |
mount Resque::Server, at: "/resque" | |
match '*path', to: redirect("/#{I18n.default_locale}/%{path}"), constraints: lambda { |req| !req.path.starts_with? "/#{I18n.default_locale}/" } | |
match '', to: redirect("/#{I18n.default_locale}") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://proofoflife.me がこんな感じのroutes.rbで構成されています。