Sha256: 14a621a8c1d79508689c040c4cfd8b9d2526d1cde3720cdadfa561a24b1f7dea

Contents?: true

Size: 517 Bytes

Versions: 5

Compression:

Stored size: 517 Bytes

Contents

CmAdmin::Engine.routes.draw do
  controller 'static' do
    get '/', action: 'dashboard'
    get '/access-denied', action: 'error_403'
  end

  controller 'exports' do
    post '/export_to_file', action: 'export'
  end

  # Defining action routes for each model
  CmAdmin.cm_admin_models.each do |model|
    model.available_actions.each do |act|
      scope model.name.tableize do
        send(act.verb, act.path.present? ? act.path : act.name, to: "#{model.name.underscore}##{act.name}")
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cm-admin-0.4.4 config/routes.rb
cm-admin-0.4.3 config/routes.rb
cm-admin-0.4.2 config/routes.rb
cm-admin-0.4.1 config/routes.rb
cm-admin-0.4.0 config/routes.rb