Skip to content

Instantly share code, notes, and snippets.

@ruevaughn
Created April 6, 2012 23:01
Show Gist options
  • Save ruevaughn/2323762 to your computer and use it in GitHub Desktop.
Save ruevaughn/2323762 to your computer and use it in GitHub Desktop.
Rake Routes for locksmith
Jensenlocksmithing::Application.routes.draw do
get "log_out" => "sessions#destroy", as: "log_out"
get "log_in" => "sessions#new", as: "log_in"
get "sites/services"
scope ":locale", locale: /#{I18n.available_locales.join("|")}/ do
resources :sites, except: [:new, :edit, :index, :show, :update, :destroy, :create] do
collection do
get :home
get :about_us
get :faq
get :discounts
get :services
get :contact_us
get :admin
get :posts
end
end
root :to => 'sites#home'
end
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 '*path', to: redirect("/#{I18n.default_locale}/%{path}")
match '', to: redirect("/#{I18n.default_locale}")
match "/savesort" => 'sites#savesort'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment