Sha256: fbb8b6e41f2b27691e15ffd52d7796af8728298fe0e1ad50af4e6b1bd532b6b4
Contents?: true
Size: 593 Bytes
Versions: 16
Compression:
Stored size: 593 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.config.cm_admin_models.each do |model| model.available_actions.sort_by {|act| act.name}.each do |act| scope model.name.tableize do send(act.verb, act.path.present? ? act.path : act.name, to: "#{model.name.underscore}##{act.name}", as: "#{model.name.underscore}_#{act.name}") end end end end
Version data entries
16 entries across 16 versions & 1 rubygems