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



50
51
52
53
54
# File 'app/controllers/concerns/effective/crud_controller/dsl.rb', line 50

def button(action, label = nil, args = {})
  instance_exec do
    before_action { _insert_button(action, label, args) }
  end
end