Sha256: 367851bd256cedad2291fe9553fbaf755577efe71fe2b53bacae5d2fa4475bc7

Contents?: true

Size: 840 Bytes

Versions: 12

Compression:

Stored size: 840 Bytes

Contents

Rails.application.routes.draw do

  scope "admin", :module => :admin, :as => "admin" do

    match "/" => "dashboard#show", :as => "dashboard"
    match "user_guide" => "base#user_guide"

    if Typus.authentication == :session
      resource :session, :only => [:new, :create], :controller => :session do
        get :destroy, :as => "destroy"
      end

      resources :account, :only => [:new, :create, :show] do
        collection do
          get :forgot_password
          post :send_password
        end
      end
    end

    Typus.models.map { |i| i.to_resource }.each do |resource|
      match "#{resource}(/:action(/:id))(.:format)", :controller => resource
    end

    Typus.resources.map { |i| i.underscore }.each do |resource|
      match "#{resource}(/:action(/:id))(.:format)", :controller => resource
    end

  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
typus-3.1.0.rc18 config/routes.rb
typus-3.1.0.rc17 config/routes.rb
typus-3.1.0.rc16 config/routes.rb
typus-3.1.0.rc15 config/routes.rb
typus-3.1.0.rc14 config/routes.rb
typus-3.1.0.rc13 config/routes.rb
typus-3.1.0.rc12 config/routes.rb
typus-3.1.0.rc11 config/routes.rb
typus-3.1.0.rc10 config/routes.rb
typus-3.1.0.rc9 config/routes.rb
typus-3.1.0.rc8 config/routes.rb
typus-3.1.0.rc7 config/routes.rb