aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/validations.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-05-01 11:16:31 +0200
committerXavier Noria <fxn@hashref.com>2011-05-01 11:16:31 +0200
commit2fbf302149cf40c791ca1207a5f984cf58903397 (patch)
tree5da770d0fd31520a6264a9864b1db1412646d100 /activerecord/lib/active_record/validations.rb
parenta0656989c47c29c87c4f243ce3695c39777c67b8 (diff)
parentb84b759ec60b5005fea183186639408fcf903450 (diff)
downloadrails-2fbf302149cf40c791ca1207a5f984cf58903397.tar.gz
rails-2fbf302149cf40c791ca1207a5f984cf58903397.tar.bz2
rails-2fbf302149cf40c791ca1207a5f984cf58903397.zip
Merge branch 'master' of git://github.com/lifo/docrails
Conflicts: railties/guides/source/contributing_to_ruby_on_rails.textile
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))