This project is archived and is in readonly mode.

#1467 ✓resolved
Yaroslav Markin

Cleanup commented code in AR::Errors

Reported by Yaroslav Markin | November 25th, 2008 @ 09:43 AM | in 2.x


    def full_messages(options = {})
      full_messages = []

      @errors.each_key do |attr|
        @errors[attr].each do |message|
          next unless message

          if attr == "base"
            full_messages << message
          else
            #key = :"activerecord.att.#{@base.class.name.underscore.to_sym}.#{attr}"
            attr_name = @base.class.human_attribute_name(attr)
            full_messages << attr_name + ' ' + message
          end
        end
      end
      full_messages
    end

Guess key = ... stuff was meant for I18n but it is commented out and looks like attr name translation works fine right now.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Referenced by

Pages