diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2011-03-28 22:31:05 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2011-03-28 22:31:05 -0700 |
commit | b671e4d86aa77af6a85ed454f7904ceaf40cc4ce (patch) | |
tree | 6ba1ff57c2834ddd803f28957a8b5bb1bb14bd34 /activemodel | |
parent | 07054fe369b0d30562642f15140f7c863dfc4328 (diff) | |
download | rails-b671e4d86aa77af6a85ed454f7904ceaf40cc4ce.tar.gz rails-b671e4d86aa77af6a85ed454f7904ceaf40cc4ce.tar.bz2 rails-b671e4d86aa77af6a85ed454f7904ceaf40cc4ce.zip |
Fix formatting and broken markup
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/errors.rb | 21 |
1 files changed, 10 insertions, 11 deletions
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 # <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) |