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

app/models/repository/cvs.rb

index f8c10ddff40e17cd3ce4b4e503caf32cdd234982..bb002d38db1b13a05397c8d7579de377159045e1 100644 (file)
@@ -22,7 +22,7 @@ class Repository::Cvs < Repository
   validates_presence_of :url, :root_url, :log_encoding
 
   def self.human_attribute_name(attribute_key_name, *args)
-    attr_name = attribute_key_name
+    attr_name = attribute_key_name.to_s
     if attr_name == "root_url"
       attr_name = "cvsroot"
     elsif attr_name == "url"