1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/guides
Ian C. Anderson fbaa5e390f i18n documentation for required belongs_to message
When you don't explicitly provide `optional: true` to a `belongs_to`
definition, rails adds a validation to ensure presence of the
`belongs_to` validation.

However, when the validation is added, it is added with a message key of
`:required`, which was not documented in the "Translations for Active
Record Models" section of the i18n guides.

Here are the lines that add the `:required` message:
c3e3577f9d/activerecord/lib/active_record/associations/builder/belongs_to.rb (L136-L138)

This commit adds the "non-optional association" validation to the table,
so rails users know how to override the message for this validation. The
default message is "must exist".
2016-08-17 18:19:59 -04:00
..
assets - Update Syntax Highlighter to version 4. 2016-07-03 00:20:27 -07:00
bug_report_templates applies new string literal convention in guides 2016-08-06 19:21:59 +02:00
rails_guides Add three new rubocop rules 2016-08-16 04:30:11 -03:00
source i18n documentation for required belongs_to message 2016-08-17 18:19:59 -04:00
.document
CHANGELOG.md Start Rails 5.1 development 🎉 2016-05-10 03:46:56 -03:00
rails_guides.rb applies new string literal convention in guides 2016-08-06 19:21:59 +02:00
Rakefile normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
w3c_validator.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00