Skip to content

Commit

Permalink
Fix formatting and broken markup
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Mar 29, 2011
1 parent 07054fe commit b671e4d
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions activemodel/lib/active_model/errors.rb
Expand Up @@ -278,19 +278,18 @@ def full_messages
# When using inheritance in your models, it will check all the inherited # 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 # 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 # <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: # it looks for these translations:
# #
# <ol> # * <tt>activemodel.errors.models.admin.attributes.title.blank</tt>
# <li><tt>activemodel.errors.models.admin.attributes.title.blank</tt></li> # * <tt>activemodel.errors.models.admin.blank</tt>
# <li><tt>activemodel.errors.models.admin.blank</tt></li> # * <tt>activemodel.errors.models.user.attributes.title.blank</tt>
# <li><tt>activemodel.errors.models.user.attributes.title.blank</tt></li> # * <tt>activemodel.errors.models.user.blank</tt>
# <li><tt>activemodel.errors.models.user.blank</tt></li> # * any default you provided through the +options+ hash (in the <tt>activemodel.errors</tt> scope)
# <li>any default you provided through the +options+ hash (in the activemodel.errors scope)</li> # * <tt>activemodel.errors.messages.blank</tt>
# <li><tt>activemodel.errors.messages.blank</tt></li> # * <tt>errors.attributes.title.blank</tt>
# <li><tt>errors.attributes.title.blank</tt></li> # * <tt>errors.messages.blank</tt>
# <li><tt>errors.messages.blank</tt></li> #
# </ol>
def generate_message(attribute, type = :invalid, options = {}) def generate_message(attribute, type = :invalid, options = {})
type = options.delete(:message) if options[:message].is_a?(Symbol) type = options.delete(:message) if options[:message].is_a?(Symbol)


Expand Down

0 comments on commit b671e4d

Please sign in to comment.