Sha256: 5cacf8c31005645dd8e45b6072507f02a445669629e957025d5ae9e812f05b2d
Contents?: true
Size: 594 Bytes
Versions: 5
Compression:
Stored size: 594 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.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}", as: "#{model.name.underscore}_#{act.name}") end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
cm-admin-0.6.2 | config/routes.rb |
cm-admin-0.6.1 | config/routes.rb |
cm-admin-0.6.0 | config/routes.rb |
cm-admin-0.5.9 | config/routes.rb |
cm-admin-0.5.8 | config/routes.rb |