Method: Effective::CrudController::Dsl#button
- Defined in:
- app/controllers/concerns/effective/crud_controller/dsl.rb
#button(action, label = nil, args = {}) ⇒ Object
This controls the resource buttons section of the page Takes precidence over any on commands
Effective::Resource will populate this with all member_actions
button :approve, ‘Approve’, unless: -> { resource.approved? }, redirect: :show button :decline, false
48 49 50 |
# File 'app/controllers/concerns/effective/crud_controller/dsl.rb', line 48 def (action, label = nil, args = {}) (action, label, args) end |