Skip to content

Instantly share code, notes, and snippets.

@fabianoalmeida
Created October 4, 2012 18:43
Show Gist options
  • Save fabianoalmeida/3835561 to your computer and use it in GitHub Desktop.
Save fabianoalmeida/3835561 to your computer and use it in GitHub Desktop.
Routes
Dinr::Application.routes.draw do
ActiveAdmin.routes(self)
devise_for :admin_users, ActiveAdmin::Devise.config
devise_scope :user do
get '/login' => 'devise/sessions#new'
get '/logout' => 'devise/sessions#destroy'
end
as :user do
match '/user/confirmation' => 'confirmations#update', :via => :put, :as => :update_user_confirmation
end
devise_for :users, :controllers => { :confirmations => "confirmations", :registrations => "registrations" }
root :to => "home#index"
match "main" => "home#main"
scope :path => ":user_id" do
resources :accounts
resources :account_types
resources :categories
resources :payees
scope :path => ":account_id" do
resources :transactions
end
resources :users
end
end
ActionDispatch::Routing::Translator.translate_from_file(
'config/locales/routes.yml', { prefix_on_default_locale: true, keep_untranslated_routes: true } )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment