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
11 12 13 |
# File 'lib/administrate/field/state_machine.rb', line 11 def self.searchable? true end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/administrate/field/state_machine.rb', line 15 def to_s data.humanize end |
#transitions ⇒ Object
First-level transitions that can be triggered from the current state
20 21 22 |
# File 'lib/administrate/field/state_machine.rb', line 20 def transitions resource.state_paths.map(&:first).uniq end |