#14 ✓resolved
Markús

UserSession active record trickery improvement

Reported by Markús | November 24th, 2008 @ 07:55 AM

Hi!

I've realized that UserSession makes some trickery to behave as an activerecord, and there is a method that is much more important that it appears at the first glance whicth is used in form messages: this method is human_attribute_name. It is important due to the new I18n Rails feature.

Actually, this method only call humanize in the attribute key name. It would be an improvement if instead of that, the method calls human_attribute_name in the authenticate_with class:


#in Authlogic::Session::ActiveRecordTrickery::ClassMethods
def human_attribute_name(attribute_key_name, options = {})
   # Actual implementantion, does not make use of I18n
   # attribute_key_name.humanize

   # Suggested implementation, this make use of I18n
   klass.human_attribute_name(attribute_key_name, options)
end

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

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

Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

People watching this ticket

Pages