mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix formatting and broken markup
This commit is contained in:
parent
07054fe369
commit
b671e4d86a
1 changed files with 10 additions and 11 deletions
|
@ -278,19 +278,18 @@ module ActiveModel
|
|||
# When using inheritance in your models, it will check all the inherited
|
||||
# models too, but only if the model itself hasn't been found. Say you have
|
||||
# <tt>class Admin < User; end</tt> and you wanted the translation for
|
||||
# the <tt>:blank</tt> error +message+ for the <tt>title</tt> +attribute+,
|
||||
# the <tt>:blank</tt> error message for the <tt>title</tt> attribute,
|
||||
# it looks for these translations:
|
||||
#
|
||||
# <ol>
|
||||
# <li><tt>activemodel.errors.models.admin.attributes.title.blank</tt></li>
|
||||
# <li><tt>activemodel.errors.models.admin.blank</tt></li>
|
||||
# <li><tt>activemodel.errors.models.user.attributes.title.blank</tt></li>
|
||||
# <li><tt>activemodel.errors.models.user.blank</tt></li>
|
||||
# <li>any default you provided through the +options+ hash (in the activemodel.errors scope)</li>
|
||||
# <li><tt>activemodel.errors.messages.blank</tt></li>
|
||||
# <li><tt>errors.attributes.title.blank</tt></li>
|
||||
# <li><tt>errors.messages.blank</tt></li>
|
||||
# </ol>
|
||||
# * <tt>activemodel.errors.models.admin.attributes.title.blank</tt>
|
||||
# * <tt>activemodel.errors.models.admin.blank</tt>
|
||||
# * <tt>activemodel.errors.models.user.attributes.title.blank</tt>
|
||||
# * <tt>activemodel.errors.models.user.blank</tt>
|
||||
# * any default you provided through the +options+ hash (in the <tt>activemodel.errors</tt> scope)
|
||||
# * <tt>activemodel.errors.messages.blank</tt>
|
||||
# * <tt>errors.attributes.title.blank</tt>
|
||||
# * <tt>errors.messages.blank</tt>
|
||||
#
|
||||
def generate_message(attribute, type = :invalid, options = {})
|
||||
type = options.delete(:message) if options[:message].is_a?(Symbol)
|
||||
|
||||
|
|
Loading…
Reference in a new issue