]> source.dussan.org Git - redmine.git/commitdiff
Rails3: use .to_s for overriding human_attribute_name parameter at group model
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 24 Feb 2012 14:56:54 +0000 (14:56 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 24 Feb 2012 14:56:54 +0000 (14:56 +0000)
On Rails 3.0.11, parameter is symbol not string in activerecord validation.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8969 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/group.rb

index cd0368a5c7a59876be8ed03fbeb923bbee8c6b77..47ef7231ae1ad71438fa0efa787d975802d32998 100644 (file)
@@ -52,7 +52,7 @@ class Group < Principal
   end
 
   def self.human_attribute_name(attribute_key_name, *args)
-    attr_name = attribute_key_name
+    attr_name = attribute_key_name.to_s
     if attr_name == 'lastname'
       attr_name = "name"
     end