Class: Administrate::Field::StateMachine
- Inherits:
-
Base
- Object
- Base
- Administrate::Field::StateMachine
- Defined in:
- lib/administrate/field/state_machine.rb
Defined Under Namespace
Classes: Engine
Class Method Summary collapse
Instance Method Summary collapse
- #to_s ⇒ Object
-
#transitions ⇒ Object
First-level transitions that can be triggered from the current state.
Class Method Details
.searchable? ⇒ Boolean
12 13 14 |
# File 'lib/administrate/field/state_machine.rb', line 12 def self.searchable? true end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/administrate/field/state_machine.rb', line 16 def to_s data.humanize end |
#transitions ⇒ Object
First-level transitions that can be triggered from the current state
21 22 23 |
# File 'lib/administrate/field/state_machine.rb', line 21 def transitions resource.state_paths.map(&:first).uniq end |