]> source.dussan.org Git - redmine.git/commitdiff
Rails3: scm: use .to_s for overriding human_attribute_name parameter at repository...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 24 Feb 2012 14:57:26 +0000 (14:57 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 24 Feb 2012 14:57:26 +0000 (14:57 +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@8970 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/repository.rb

index 2906646003570f8b61115dd46b9d3fd9f48771c2..5b1d681115cfbf1a597919a790c9fa5be96f8067 100644 (file)
@@ -49,7 +49,7 @@ class Repository < ActiveRecord::Base
   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 == "log_encoding"
       attr_name = "commit_logs_encoding"
     end