diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-03-03 07:59:29 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-03-03 07:59:29 +0000 |
commit | b25d496c246702a72f236e88f5a974282b902fa4 (patch) | |
tree | 0bbe31ff09bd42bcb160687118f7311761b9fcdb /app/models/group.rb | |
parent | d5ca5146888f01d710091dc5ddb160cf653ffcbd (diff) | |
download | redmine-b25d496c246702a72f236e88f5a974282b902fa4.tar.gz redmine-b25d496c246702a72f236e88f5a974282b902fa4.zip |
Mail handler: adds --default-group option to add created user to one or more groups (#13340).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11522 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index fd0f583f7..d1b2cb966 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -30,6 +30,7 @@ class Group < Principal before_destroy :remove_references_before_destroy scope :sorted, lambda { order("#{table_name}.lastname ASC") } + scope :named, lambda {|arg| where("LOWER(#{table_name}.lastname) = LOWER(?)", arg.to_s.strip)} safe_attributes 'name', 'user_ids', |