Module: ConcernsOnRails::Models::Stateable::ClassMethods
- Includes:
- Support::ColumnGuard
- Defined in:
- lib/concerns_on_rails/models/stateable.rb
Overview
Defined as a real module (not class_methods do) so all the private
builder helpers live under a single private and aren't constrained by
Metrics/BlockLength. ActiveSupport::Concern auto-extends ClassMethods.
Instance Method Summary collapse
-
#stateable_by(field, states:, **options) ⇒ Object
Configure the state column.
Methods included from Support::ColumnGuard
Instance Method Details
#stateable_by(field, states:, **options) ⇒ Object
Configure the state column. See the module docs for the full DSL.
75 76 77 78 79 80 81 |
# File 'lib/concerns_on_rails/models/stateable.rb', line 75 def stateable_by(field, states:, **) stateable_configure!(field, states, ) stateable_validate! stateable_define_states stateable_define_transitions stateable_apply_default end |