summaryrefslogtreecommitdiffstats
path: root/app/controllers/my_controller.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-09-28 22:13:11 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-09-28 22:13:11 +0000
commit747b9ec5683ff8ae96f96c09ea709376db50b910 (patch)
tree575d698b120dbb947fa907e1230e5d5309efa3f6 /app/controllers/my_controller.rb
parent437690119b0b1bd462d45f2367c1fe805e529972 (diff)
downloadredmine-747b9ec5683ff8ae96f96c09ea709376db50b910.tar.gz
redmine-747b9ec5683ff8ae96f96c09ea709376db50b910.zip
Refactor: move method to model
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4224 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/my_controller.rb')
-rw-r--r--app/controllers/my_controller.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index e430cab0e..46747b334 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -66,13 +66,7 @@ class MyController < ApplicationController
return
end
end
- @notification_options = User::MAIL_NOTIFICATION_OPTIONS
- # Only users that belong to more than 1 project can select projects for which they are notified
- # Note that @user.membership.size would fail since AR ignores
- # :include association option when doing a count
- if @user.memberships.length < 1
- @notification_options.delete_if {|option| option.first == :selected}
- end
+ @notification_options = @user.valid_notification_options
@notification_option = @user.mail_notification #? ? 'all' : (@user.notified_projects_ids.empty? ? 'none' : 'selected')
end