From 666d028bb82428a0649935b1d1814db0e20a406f Mon Sep 17 00:00:00 2001 From: Sunny Ripert Date: Tue, 28 May 2013 14:19:22 +0200 Subject: End-of-line whitespace hunt --- guides/source/active_record_validations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source/active_record_validations.md') diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index 621d2222ff..ebf4e58444 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -677,13 +677,13 @@ class GoodnessValidator def initialize(person) @person = person end - + def validate if some_complex_condition_involving_ivars_and_private_methods? @person.errors[:base] << "This person is evil" end end - + # … end ``` -- cgit v1.2.3 From 53607be559ec60e3b5bd915f8533550648f7ef8a Mon Sep 17 00:00:00 2001 From: Sunny Ripert Date: Tue, 28 May 2013 14:37:04 +0200 Subject: Remove double spaces in guides --- guides/source/active_record_validations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/active_record_validations.md') diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index ebf4e58444..e155a2f7b3 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -243,7 +243,7 @@ line of code you can add the same kind of validation to several attributes. All of them accept the `:on` and `:message` options, which define when the validation should be run and what message should be added to the `errors` collection if it fails, respectively. The `:on` option takes one of the values -`:save` (the default), `:create` or `:update`. There is a default error +`:save` (the default), `:create` or `:update`. There is a default error message for each one of the validation helpers. These messages are used when the `:message` option isn't specified. Let's take a look at each one of the available helpers. -- cgit v1.2.3 From ad694f2f264b5afe04af77b3f43971984f32808c Mon Sep 17 00:00:00 2001 From: Rashmi Yadav Date: Wed, 12 Jun 2013 23:04:40 +0200 Subject: Using 1.9 syntax for edge guides --- guides/source/active_record_validations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source/active_record_validations.md') diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index e155a2f7b3..12be7c1dec 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -736,8 +736,8 @@ class Topic < ActiveRecord::Base validates :title, length: { is: 5 }, allow_blank: true end -Topic.create("title" => "").valid? # => true -Topic.create("title" => nil).valid? # => true +Topic.create(title: "").valid? # => true +Topic.create(title: nil).valid? # => true ``` ### `:message` -- cgit v1.2.3