Module: Tramway::StateMachineButtonsHelper
- Defined in:
- app/helpers/tramway/state_machine_buttons_helper.rb
Instance Method Summary collapse
Instance Method Details
#state_events_buttons(object, **options) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/helpers/tramway/state_machine_buttons_helper.rb', line 4 def (object, **) .each do |(key, value)| define_singleton_method(key) { value } end content_tag(:div, class: 'btn-group-vertical') do transitions(object, state_method, [:without]).each do |event| ( object, event: event[:event], model_name: object.class.model_name.name.underscore, form_options: , ** ) end end end |