From 6e777b745305b627c934d5585ca2083b482011d0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 30 Nov 2008 12:12:06 +0000 Subject: Makes activity view accept a user_id param to show user's activity (#1002). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2067 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/activity/fetcher.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/redmine/activity') diff --git a/lib/redmine/activity/fetcher.rb b/lib/redmine/activity/fetcher.rb index b12caa441..1d0bd8a16 100644 --- a/lib/redmine/activity/fetcher.rb +++ b/lib/redmine/activity/fetcher.rb @@ -48,8 +48,16 @@ module Redmine end # Sets the scope + # Argument can be :all, :default or an array of event types def scope=(s) - @scope = s & event_types + case s + when :all + @scope = event_types + when :default + default_scope! + else + @scope = s & event_types + end end # Resets the scope to the default scope -- cgit v1.2.3