Created
April 6, 2012 20:56
-
-
Save ruevaughn/2322861 to your computer and use it in GitHub Desktop.
Entire Rake File with rake routes output
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
Jensenlocksmithing::Application.routes.draw do | |
get "log_out" => "sessions#destroy", as: "log_out" | |
get "log_in" => "sessions#new", as: "log_in" | |
#scope "(:locale)", :defaults => { :locale => "en" } do | |
#scope ":locale", locale: /#{I18n.available_locales.join("|")}/ do | |
resources :sites, except: [:new, :edit, :index, :show, :update, :destroy, :create] do | |
member do | |
get :home | |
get :about_us | |
get :faq | |
get :discounts | |
get :service | |
get :contact_us | |
get :admin | |
get :posts | |
end | |
end | |
root :to => 'sites#home' | |
resources :users | |
resources :abouts | |
resources :sessions | |
resources :coupons | |
resources :monthly_posts | |
resources :reviews | |
resources :categories do | |
collection { post :sort } | |
resources :children, :controller => :categories, :only => [:index, :new, :create, :new_subcategory] | |
end | |
resources :products do | |
member do | |
put :move_up | |
put :move_down | |
end | |
end | |
resources :faqs do | |
collection { post :sort } | |
end | |
match '', to: redirect("/#{I18n.default_locale}") | |
#match '*path', to: redirect("/#{I18n.default_locale}/%{path}") | |
match "/savesort" => 'sites#savesort' | |
end | |
OUTPUTS | |
Jensenlocksmithing::Application.routes.draw do | |
get "log_out" => "sessions#destroy", as: "log_out" | |
get "log_in" => "sessions#new", as: "log_in" | |
#scope "(:locale)", :defaults => { :locale => "en" } do | |
#scope ":locale", locale: /#{I18n.available_locales.join("|")}/ do | |
resources :sites, except: [:new, :edit, :index, :show, :update, :destroy, :create] do | |
member do | |
get :home | |
get :about_us | |
get :faq | |
get :discounts | |
get :service | |
get :contact_us | |
get :admin | |
get :posts | |
end | |
end | |
root :to => 'sites#home' | |
resources :users | |
resources :abouts | |
resources :sessions | |
resources :coupons | |
resources :monthly_posts | |
resources :reviews | |
resources :categories do | |
collection { post :sort } | |
resources :children, :controller => :categories, :only => [:index, :new, :create, :new_subcategory] | |
end | |
resources :products do | |
member do | |
put :move_up | |
put :move_down | |
end | |
end | |
resources :faqs do | |
collection { post :sort } | |
end | |
match '', to: redirect("/#{I18n.default_locale}") | |
#match '*path', to: redirect("/#{I18n.default_locale}/%{path}") | |
match "/savesort" => 'sites#savesort' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment