From b671e4d86aa77af6a85ed454f7904ceaf40cc4ce Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 28 Mar 2011 22:31:05 -0700 Subject: Fix formatting and broken markup --- activemodel/lib/active_model/errors.rb | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'activemodel/lib/active_model/errors.rb') diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index c2f0228785..f3ec406ec8 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -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 # class Admin < User; end and you wanted the translation for - # the :blank error +message+ for the title +attribute+, + # the :blank error message for the title attribute, # it looks for these translations: # - #
    - #
  1. activemodel.errors.models.admin.attributes.title.blank
  2. - #
  3. activemodel.errors.models.admin.blank
  4. - #
  5. activemodel.errors.models.user.attributes.title.blank
  6. - #
  7. activemodel.errors.models.user.blank
  8. - #
  9. any default you provided through the +options+ hash (in the activemodel.errors scope)
  10. - #
  11. activemodel.errors.messages.blank
  12. - #
  13. errors.attributes.title.blank
  14. - #
  15. errors.messages.blank
  16. - #
+ # * activemodel.errors.models.admin.attributes.title.blank + # * activemodel.errors.models.admin.blank + # * activemodel.errors.models.user.attributes.title.blank + # * activemodel.errors.models.user.blank + # * any default you provided through the +options+ hash (in the activemodel.errors scope) + # * activemodel.errors.messages.blank + # * errors.attributes.title.blank + # * errors.messages.blank + # def generate_message(attribute, type = :invalid, options = {}) type = options.delete(:message) if options[:message].is_a?(Symbol) -- cgit v1.2.3