Sha256: f5645201a08264314b0c409890eed53870f53fb2e10bad9a29d5fe903ad26e60

Contents?: true

Size: 764 Bytes

Versions: 13

Compression:

Stored size: 764 Bytes

Contents

# frozen_string_literal: true

RailsAdmin::Engine.routes.draw do
  controller 'main' do
    RailsAdmin::Config::Actions.all(:root).each { |action| match "/#{action.route_fragment}", action: action.action_name, as: action.action_name, via: action.http_methods }
    scope ':model_name' do
      RailsAdmin::Config::Actions.all(:collection).each { |action| match "/#{action.route_fragment}", action: action.action_name, as: action.action_name, via: action.http_methods }
      post '/bulk_action', action: :bulk_action, as: 'bulk_action'
      scope ':id' do
        RailsAdmin::Config::Actions.all(:member).each { |action| match "/#{action.route_fragment}", action: action.action_name, as: action.action_name, via: action.http_methods }
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rails_admin-3.3.0 config/routes.rb
rails_admin-3.2.1 config/routes.rb
rails_admin-3.2.0 config/routes.rb
rails_admin-3.2.0.rc config/routes.rb
rails_admin-3.2.0.beta config/routes.rb
rails_admin-3.1.4 config/routes.rb
rails_admin-3.1.3 config/routes.rb
rails_admin-3.1.2 config/routes.rb
rails_admin-3.1.1 config/routes.rb
rails_admin-3.1.0 config/routes.rb
rails_admin-3.1.0.rc2 config/routes.rb
rails_admin-3.1.0.rc config/routes.rb
rails_admin-3.1.0.beta config/routes.rb