Sha256: f60f24aacd843911a7d0b60ee5c50acd5048048cad41aed2475ef89548910499

Contents?: true

Size: 757 Bytes

Versions: 11

Compression:

Stored size: 757 Bytes

Contents

AdminIt::Engine.routes.draw do
  AdminIt.resources.each do |name, resource|
    resources(resource.plural,
              controller: "admin_it/#{name}",
              except: [:index]) do
      resource.collections.each do |context|
        next unless context.collection?
        get context.context_name, on: :collection
      end
      unless resource.collections.empty?
        get('/', on: :collection, action: resource.default_context)
      end
    end
  end
  unless AdminIt.resources.empty?
    name, resource = AdminIt.resources.first
    get('/',
        controller: "admin_it/#{name}",
        action: resource.default_context)
  end

  # generates signed urls for S3
  resources :signed_url, only: :index, controller: 'admin_it/signed_url'
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
admin_it-1.3.8 config/routes.rb
admin_it-1.3.7 config/routes.rb
admin_it-1.3.6 config/routes.rb
admin_it-1.3.5 config/routes.rb
admin_it-1.3.4 config/routes.rb
admin_it-1.3.3 config/routes.rb
admin_it-1.3.2 config/routes.rb
admin_it-1.3.1 config/routes.rb
admin_it-1.3.0 config/routes.rb
admin_it-1.2.8 config/routes.rb
admin_it-1.2.7 config/routes.rb