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

app/models/repository/filesystem.rb

index ca8a67284a3e99c1919284c99a581ce08e58bc04..69a53505b87b42eba05481de55a879349fc8f6a3 100644 (file)
@@ -25,7 +25,7 @@ class Repository::Filesystem < Repository
   validates_presence_of :url
 
   def self.human_attribute_name(attribute_key_name, *args)
-    attr_name = attribute_key_name
+    attr_name = attribute_key_name.to_s
     if attr_name == "url"
       attr_name = "root_directory"
     end