Administrate::Field::StateMachine
A plugin to handle state machine attributes in Administrate.
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.
Usage
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.
About
Administrate::Field::StateMachine is maintained by Zooppa.