diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2015-02-01 10:31:53 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2015-02-01 10:31:54 -0200 |
commit | fdeef19833ce47b03bcb792f1850f6233f050b9f (patch) | |
tree | 8da97ee3782434caddee95a6bd9c52c795e2a46a | |
parent | e374db237198b07e778c41320922d574fef4bc5e (diff) | |
download | rails-fdeef19833ce47b03bcb792f1850f6233f050b9f.tar.gz rails-fdeef19833ce47b03bcb792f1850f6233f050b9f.tar.bz2 rails-fdeef19833ce47b03bcb792f1850f6233f050b9f.zip |
Move required error message and changelog to Active Record
The new association error belongs to Active Record, not Active Model.
See #18700 for reference.
-rw-r--r-- | activemodel/CHANGELOG.md | 5 | ||||
-rw-r--r-- | activemodel/lib/active_model/locale/en.yml | 3 | ||||
-rw-r--r-- | activerecord/CHANGELOG.md | 5 | ||||
-rw-r--r-- | activerecord/lib/active_record/locale/en.yml | 1 |
4 files changed, 7 insertions, 7 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index 4c78fc91a5..5830a00bc5 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,8 +1,3 @@ -* Change the default error message from `can't be blank` to `must exist` for - the presence validator of the `:required` option on `belongs_to`/`has_one` associations. - - *Henrik Nygren* - * Assigning an unknown attribute key to an `ActiveModel` instance during initialization will now raise `ActiveModel::AttributeAssignment::UnknownAttributeError` instead of `NoMethodError` diff --git a/activemodel/lib/active_model/locale/en.yml b/activemodel/lib/active_model/locale/en.yml index b0b20ee0bf..b11c8f53b4 100644 --- a/activemodel/lib/active_model/locale/en.yml +++ b/activemodel/lib/active_model/locale/en.yml @@ -14,10 +14,9 @@ en: empty: "can't be empty" blank: "can't be blank" present: "must be blank" - required: "must exist" too_long: one: "is too long (maximum is 1 character)" - other: "is too long (maximum is %{count} characters)" + other: "is too long (maximum is %{count} characters)" too_short: one: "is too short (minimum is 1 character)" other: "is too short (minimum is %{count} characters)" diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 4cc62346cb..dd0bbeaaac 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,8 @@ +* Change the default error message from `can't be blank` to `must exist` for + the presence validator of the `:required` option on `belongs_to`/`has_one` associations. + + *Henrik Nygren* + * Fixed ActiveRecord::Relation#group method when argument is SQL reserved key word: Example: diff --git a/activerecord/lib/active_record/locale/en.yml b/activerecord/lib/active_record/locale/en.yml index b1fbd38622..8a3c27e6da 100644 --- a/activerecord/lib/active_record/locale/en.yml +++ b/activerecord/lib/active_record/locale/en.yml @@ -7,6 +7,7 @@ en: # Default error messages errors: messages: + required: "must exist" taken: "has already been taken" # Active Record models configuration |