Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

🤖 A plugin to handle state machine attributes in Administrate

License

Notifications You must be signed in to change notification settings

zooppa/administrate-field-state_machine

Repository files navigation

Administrate::Field::StateMachine

No Maintenance Intended Build status Code Climate


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 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.