This gem is not actively maintained anymore.
If you’re interested in taking over and steward the project moving forward, please get in touch.
A plugin to handle state machine attributes in Administrate.
Add it to your Gemfile
:
gem 'administrate-field-state_machine', '~> 0.2.0'
Run:
$ bundle install
Add to your FooDashboard
:
ATTRIBUTE_TYPES = {
bar: Field::StateMachine
}.freeze
Add to your FooController
:
def permitted_attributes
super + [:state_event]
end
state_event
is used by the state machine gem to implicitly trigger the event.
Administrate::Field::StateMachine is maintained by Zooppa.