Sha256: 837b9e20b847b0c0290e60a6b2f18a2b7e491cf9ab996cf307431bed9b12199e

Contents?: true

Size: 746 Bytes

Versions: 2

Compression:

Stored size: 746 Bytes

Contents

class ActionDispatch::Routing::Mapper

  def cms_fortress_routes(options = {})
    path = options[:path] || "cms-admin"

    devise_for "cms/fortress/users",
      :path => path,
      :path_names => {
        :sign_in => 'login', :sign_out => 'logout'
      },
      :controllers => {
        :sessions => 'cms/fortress/users/sessions'
      }

    scope path, module: 'cms/fortress' do
      resources :roles, :as => 'cms_fortress_roles' do
        member do
          post :refresh
        end
      end
      resources :users, :as => 'cms_fortress_users'

      get 'settings/users' => 'admin#users', :as => 'cms_fortress_user_settings'
      get 'unauthorised' => 'admin#unauthorised', :as => 'cms_fortress_unauthorised'

    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cms-fortress-1.1.3 lib/cms/fortress/routes/admin.rb
cms-fortress-1.1.2 lib/cms/fortress/routes/admin.rb