Rails3: scm: git: use .to_s for overriding human_attribute_name parameter
On Rails 3.0.11, parameter is symbol not string in activerecord validation. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8975 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e6916cf72f
commit
ebb109b67e
|
@ -23,7 +23,7 @@ class Repository::Git < Repository
|
||||||
validates_presence_of :url
|
validates_presence_of :url
|
||||||
|
|
||||||
def self.human_attribute_name(attribute_key_name, *args)
|
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"
|
if attr_name == "url"
|
||||||
attr_name = "path_to_repository"
|
attr_name = "path_to_repository"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue