@@ -7,5 +7,6 class Meeting < ActiveRecord::Base | |||||
7 | :url => Proc.new {|o| {:controller => 'meetings', :action => 'show', :id => o.id}} |
|
7 | :url => Proc.new {|o| {:controller => 'meetings', :action => 'show', :id => o.id}} | |
8 |
|
8 | |||
9 | acts_as_activity_provider :timestamp => 'scheduled_on', |
|
9 | acts_as_activity_provider :timestamp => 'scheduled_on', | |
10 |
: |
|
10 | :scope => includes(:project), | |
|
11 | :permission => nil | |||
11 | end |
|
12 | end |
@@ -29,7 +29,7 module Redmine | |||||
29 | send :include, Redmine::Acts::ActivityProvider::InstanceMethods |
|
29 | send :include, Redmine::Acts::ActivityProvider::InstanceMethods | |
30 | end |
|
30 | end | |
31 |
|
31 | |||
32 |
options.assert_valid_keys(:type, :permission, :timestamp, :author_key, |
|
32 | options.assert_valid_keys(:type, :permission, :timestamp, :author_key, :scope) | |
33 | self.activity_provider_options ||= {} |
|
33 | self.activity_provider_options ||= {} | |
34 |
|
34 | |||
35 | # One model can provide different event types |
|
35 | # One model can provide different event types | |
@@ -37,7 +37,6 module Redmine | |||||
37 | event_type = options.delete(:type) || self.name.underscore.pluralize |
|
37 | event_type = options.delete(:type) || self.name.underscore.pluralize | |
38 |
|
38 | |||
39 | options[:timestamp] ||= "#{table_name}.created_on" |
|
39 | options[:timestamp] ||= "#{table_name}.created_on" | |
40 | options[:find_options] ||= {} |
|
|||
41 | options[:author_key] = "#{table_name}.#{options[:author_key]}" if options[:author_key].is_a?(Symbol) |
|
40 | options[:author_key] = "#{table_name}.#{options[:author_key]}" if options[:author_key].is_a?(Symbol) | |
42 | self.activity_provider_options[event_type] = options |
|
41 | self.activity_provider_options[event_type] = options | |
43 | end |
|
42 | end |
General Comments 0
You need to be logged in to leave comments.
Login now