instance method
perform_validations
Ruby on Rails 3.0.20
Since v3.0.20Signature
perform_validations(options={})
No documentation comment.
Parameters
-
optionsopt = {}
Source
# File activerecord/lib/active_record/validations.rb, line 65
def perform_validations(options={})
perform_validation = case options
when Hash
options[:validate] != false
else
ActiveSupport::Deprecation.warn "save(#{options}) is deprecated, please give save(:validate => #{options}) instead", caller
options
end
if perform_validation
valid?(options.is_a?(Hash) ? options[:context] : nil)
else
true
end
end
Defined in activerecord/lib/active_record/validations.rb line 65
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Validations