diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-18 13:20:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-18 13:20:19 +0000 |
commit | 5eed64b8488ac1f45537f9d8cb36a811921f7794 (patch) | |
tree | 1307dcdb545ecc5dc543d3bf765a0f796a2bf3e8 /app/models | |
parent | 2a0257e8af822b1e3022479b213ca4bf7d0ef903 (diff) | |
download | redmine-5eed64b8488ac1f45537f9d8cb36a811921f7794.tar.gz redmine-5eed64b8488ac1f45537f9d8cb36a811921f7794.zip |
human_attribute_name accepts optional argument.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8286 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/group.rb | 4 | ||||
-rw-r--r-- | app/models/repository.rb | 4 | ||||
-rw-r--r-- | app/models/repository/bazaar.rb | 4 | ||||
-rw-r--r-- | app/models/repository/cvs.rb | 4 | ||||
-rw-r--r-- | app/models/repository/darcs.rb | 4 | ||||
-rw-r--r-- | app/models/repository/filesystem.rb | 4 | ||||
-rw-r--r-- | app/models/repository/git.rb | 4 | ||||
-rw-r--r-- | app/models/repository/mercurial.rb | 4 |
8 files changed, 16 insertions, 16 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index c79b98111..cd0368a5c 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -51,12 +51,12 @@ class Group < Principal end end - def self.human_attribute_name(attribute_key_name) + def self.human_attribute_name(attribute_key_name, *args) attr_name = attribute_key_name if attr_name == 'lastname' attr_name = "name" end - super(attr_name) + super(attr_name, *args) end private diff --git a/app/models/repository.rb b/app/models/repository.rb index 2cd5c8820..5130cc220 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -40,12 +40,12 @@ class Repository < ActiveRecord::Base end end - def self.human_attribute_name(attribute_key_name) + def self.human_attribute_name(attribute_key_name, *args) attr_name = attribute_key_name if attr_name == "log_encoding" attr_name = "commit_logs_encoding" end - super(attr_name) + super(attr_name, *args) end # Removes leading and trailing whitespace diff --git a/app/models/repository/bazaar.rb b/app/models/repository/bazaar.rb index b290bc8b0..d18dd6aed 100644 --- a/app/models/repository/bazaar.rb +++ b/app/models/repository/bazaar.rb @@ -21,12 +21,12 @@ class Repository::Bazaar < Repository attr_protected :root_url validates_presence_of :url, :log_encoding - def self.human_attribute_name(attribute_key_name) + def self.human_attribute_name(attribute_key_name, *args) attr_name = attribute_key_name if attr_name == "url" attr_name = "path_to_repository" end - super(attr_name) + super(attr_name, *args) end def self.scm_adapter_class diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb index e1bc9e33d..f8c10ddff 100644 --- a/app/models/repository/cvs.rb +++ b/app/models/repository/cvs.rb @@ -21,14 +21,14 @@ require 'digest/sha1' class Repository::Cvs < Repository validates_presence_of :url, :root_url, :log_encoding - def self.human_attribute_name(attribute_key_name) + def self.human_attribute_name(attribute_key_name, *args) attr_name = attribute_key_name if attr_name == "root_url" attr_name = "cvsroot" elsif attr_name == "url" attr_name = "cvs_module" end - super(attr_name) + super(attr_name, *args) end def self.scm_adapter_class diff --git a/app/models/repository/darcs.rb b/app/models/repository/darcs.rb index 8003583a5..187e4783e 100644 --- a/app/models/repository/darcs.rb +++ b/app/models/repository/darcs.rb @@ -20,12 +20,12 @@ require 'redmine/scm/adapters/darcs_adapter' class Repository::Darcs < Repository validates_presence_of :url, :log_encoding - def self.human_attribute_name(attribute_key_name) + def self.human_attribute_name(attribute_key_name, *args) attr_name = attribute_key_name if attr_name == "url" attr_name = "path_to_repository" end - super(attr_name) + super(attr_name, *args) end def self.scm_adapter_class diff --git a/app/models/repository/filesystem.rb b/app/models/repository/filesystem.rb index a107a2f64..ca8a67284 100644 --- a/app/models/repository/filesystem.rb +++ b/app/models/repository/filesystem.rb @@ -24,12 +24,12 @@ class Repository::Filesystem < Repository attr_protected :root_url validates_presence_of :url - def self.human_attribute_name(attribute_key_name) + def self.human_attribute_name(attribute_key_name, *args) attr_name = attribute_key_name if attr_name == "url" attr_name = "root_directory" end - super(attr_name) + super(attr_name, *args) end def self.scm_adapter_class diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index 586a6e5ef..86507acbc 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -22,12 +22,12 @@ class Repository::Git < Repository attr_protected :root_url validates_presence_of :url - def self.human_attribute_name(attribute_key_name) + def self.human_attribute_name(attribute_key_name, *args) attr_name = attribute_key_name if attr_name == "url" attr_name = "path_to_repository" end - super(attr_name) + super(attr_name, *args) end def self.scm_adapter_class diff --git a/app/models/repository/mercurial.rb b/app/models/repository/mercurial.rb index 58332e803..e40841f20 100644 --- a/app/models/repository/mercurial.rb +++ b/app/models/repository/mercurial.rb @@ -29,12 +29,12 @@ class Repository::Mercurial < Repository # number of changesets to fetch at once FETCH_AT_ONCE = 100 - def self.human_attribute_name(attribute_key_name) + def self.human_attribute_name(attribute_key_name, *args) attr_name = attribute_key_name if attr_name == "url" attr_name = "path_to_repository" end - super(attr_name) + super(attr_name, *args) end def self.scm_adapter_class |