aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/validations.rb
diff options
context:
space:
mode:
authorDan Pickett <dpickett@enlightsolutions.com>2011-04-29 19:18:10 -0400
committerDan Pickett <dpickett@enlightsolutions.com>2011-04-29 19:18:10 -0400
commit1efaed5af13f876833b3acd614e8d0116812f308 (patch)
tree8b2dd01afee8b4bdcf976d6a082d9fb89b32d43e /activerecord/lib/active_record/validations.rb
parent85c8d73642f03410b86ee842edcfe0eba1d4252c (diff)
parent010dbf7a2fd30f8dabebb3f04fed22c661d6bf80 (diff)
downloadrails-1efaed5af13f876833b3acd614e8d0116812f308.tar.gz
rails-1efaed5af13f876833b3acd614e8d0116812f308.tar.bz2
rails-1efaed5af13f876833b3acd614e8d0116812f308.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord/lib/active_record/validations.rb')
-rw-r--r--activerecord/lib/active_record/validations.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb
index d73fce9fd0..de36dd20b3 100644
--- a/activerecord/lib/active_record/validations.rb
+++ b/activerecord/lib/active_record/validations.rb
@@ -30,7 +30,7 @@ module ActiveRecord
include ActiveModel::Validations
module ClassMethods
- # Creates an object just like Base.create but calls save! instead of save
+ # Creates an object just like Base.create but calls <tt>save!</tt> instead of +save+
# so an exception is raised if the record is invalid.
def create!(attributes = nil, &block)
if attributes.is_a?(Array)
@@ -44,13 +44,13 @@ module ActiveRecord
end
end
- # The validation process on save can be skipped by passing :validate => false. The regular Base#save method is
+ # The validation process on save can be skipped by passing <tt>:validate => false</tt>. The regular Base#save method is
# replaced with this when the validations module is mixed in, which it is by default.
def save(options={})
perform_validations(options) ? super : false
end
- # Attempts to save the record just like Base#save but will raise a RecordInvalid exception instead of returning false
+ # Attempts to save the record just like Base#save but will raise a +RecordInvalid+ exception instead of returning false
# if the record is not valid.
def save!(options={})
perform_validations(options) ? super : raise(RecordInvalid.new(self))