Sha256: 5a64d88af71fe1925e4ba573e77ba7b2d05f4194bd83c64651e7f6a1601e2c80

Contents?: true

Size: 858 Bytes

Versions: 9

Compression:

Stored size: 858 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, :forgot_password] 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

9 entries across 9 versions & 1 rubygems

Version Path
typus-3.0.12 config/routes.rb
typus-3.0.11 config/routes.rb
typus-3.0.11.rc5 config/routes.rb
typus-3.0.11.rc4 config/routes.rb
typus-3.0.11.rc3 config/routes.rb
typus-3.0.11.rc2 config/routes.rb
typus-3.0.11.rc1 config/routes.rb
typus-3.0.10 config/routes.rb
typus-3.0.9 config/routes.rb