mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fix formatting and broken markup
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user