Permalink
Browse files

Fixed human_name for the model to use its own human name and not dele…

…gate to the associated model.
  • Loading branch information...
binarylogic committed Mar 25, 2009
1 parent 370655e commit b0e3bb0e57c87227190111d4927b597627efdab3
View
@@ -1,6 +1,7 @@
== 2.0.3
* Fixed error where default session class does not exist.
+* Fixed human_name for the model to use its own human name and not delegate to the associated model. Translation should be under authlogic.models.user_session (or whatever the name of your session is).
== 2.0.2 released 2009-3-24
@@ -16,7 +16,7 @@ def human_attribute_name(*args)
end
def human_name(*args)
- klass.human_name(*args)
+ I18n.t("models.#{name.underscore}", {:count => 1, :default => name.humanize})
end
# For rails < 2.3, mispelled
@@ -8,7 +8,7 @@ def test_human_attribute_name
end
def test_human_name
- assert_equal "User", UserSession.human_name
+ assert_equal "Usersession", UserSession.human_name
end
def test_self_and_descendents_from_active_record

0 comments on commit b0e3bb0

Please sign in to comment.