Module: Stateflow::Persistence::ActiveRecord
- Defined in:
- lib/stateflow/persistence/active_record.rb
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
Class Method Details
.install(base) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/stateflow/persistence/active_record.rb', line 4 def self.install(base) ActiveSupport::Deprecation.silence do base.respond_to?(:before_validation_on_create) ? base.before_validation_on_create(:ensure_initial_state) : base.before_validation(:ensure_initial_state, :on => :create) base.send :include, InstanceMethods end end |