Module: Workflow
- Defined in:
- lib/workflow.rb
Defined Under Namespace
Modules: ActiveRecordInstanceMethods, WorkflowClassMethods, WorkflowInstanceMethods Classes: Event, NoTransitionAllowed, Specification, State, TransitionHalted
Class Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
236 237 238 239 240 241 242 243 |
# File 'lib/workflow.rb', line 236 def self.included(klass) klass.send :include, WorkflowInstanceMethods klass.extend WorkflowClassMethods if klass < ActiveRecord::Base klass.send :include, ActiveRecordInstanceMethods klass.before_validation :write_initial_state end end |