Administrate::Field::StateMachine
IMPORTANT NOTICE
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.
Usage
Add it to your Gemfile:
gem 'administrate-field-state_machine', '~> 0.2.0'Run:
$ bundle installAdd to your FooDashboard:
ATTRIBUTE_TYPES = {
bar: Field::StateMachine
}.freezeAdd to your FooController:
def permitted_attributes
super + [:state_event]
endstate_event is used by the state machine gem to implicitly trigger the event.
About
Administrate::Field::StateMachine is maintained by Zooppa.