Sha256: ec88965987fdc4c325f307de75a795e890a78a067d6f3a4c7dcc8a56baf27dfa

Contents?: true

Size: 1.42 KB

Versions: 1

Compression:

Stored size: 1.42 KB

Contents

Refinery::Core::Engine.routes.draw do
  begin
    devise_for :refinery_user,
               :class_name => 'Refinery::User',
               :path => 'refinery/users',
               :controllers => { :registrations => 'refinery/users' },
               :skip => [:registrations],
               :path_names => { :sign_out => 'logout',
                                :sign_in => 'login',
                                :sign_up => 'register' }

    # Override Devise's other routes for convenience methods.
    devise_scope :refinery_user do
      get '/refinery/login', :to => "sessions#new", :as => :new_refinery_user_session
      get '/refinery/logout', :to => "sessions#destroy", :as => :destroy_refinery_user_session
      get '/refinery/users/register' => 'users#new', :as => :new_refinery_user_registration
      post '/refinery/users/register' => 'users#create', :as => :refinery_user_registration
    end
  rescue RuntimeError => exc
    if exc.message =~ /ORM/
      # We don't want to complain on a fresh installation.
      if (ARGV || []).exclude?('--fresh-installation')
        puts "---\nYou can safely ignore the following warning if you're currently installing Refinery as Devise support files have not yet been copied to your application:\n\n"
        puts exc.message
        puts '---'
      end
    else
      raise exc
    end
  end

  namespace :admin, :path => 'refinery' do
    resources :users, :except => :show
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
refinerycms-authentication-2.0.0 config/routes.rb