diff options
author | Sebastian Martinez <sebastian@wyeworks.com> | 2011-04-24 19:44:12 -0300 |
---|---|---|
committer | Sebastian Martinez <sebastian@wyeworks.com> | 2011-04-24 19:44:12 -0300 |
commit | c60e207674fb7844c9586f98be6ad930362b1a3d (patch) | |
tree | 6efe32bba68018d9852d4f84ce3571a365d8050e /activerecord/lib/active_record | |
parent | dcee094b22891a95b69e0c14a963b2f857bfecd0 (diff) | |
download | rails-c60e207674fb7844c9586f98be6ad930362b1a3d.tar.gz rails-c60e207674fb7844c9586f98be6ad930362b1a3d.tar.bz2 rails-c60e207674fb7844c9586f98be6ad930362b1a3d.zip |
Better formatting here
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/validations.rb | 6 |
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)) |