Module: ActiveModel::Validations::HelperMethods
- Defined in:
- lib/active_model/validations/helper_methods.rb
Instance Method Summary collapse
- #validate_state_history(association, options = {}) ⇒ Object
- #validate_state_history_entry(options = {}) ⇒ Object
Instance Method Details
#validate_state_history(association, options = {}) ⇒ Object
15 16 17 18 19 |
# File 'lib/active_model/validations/helper_methods.rb', line 15 def validate_state_history(association, = {}) params = { :association => association } params.merge!() validates_with StateHistoryValidator, params end |
#validate_state_history_entry(options = {}) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/active_model/validations/helper_methods.rb', line 7 def validate_state_history_entry( = {}) start_attr = [:start] || :start validates start_attr, :presence => true validates_with StateHistoryEntryValidator, end |