Sha256: bf0cb9366653f2a21ab2c46c02b41615331263a7974c023c877828d4184f5c3c
Contents?: true
Size: 543 Bytes
Versions: 1
Compression:
Stored size: 543 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.sort_by {|act| act.class}.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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cm-admin-0.5.0 | config/routes.rb |