diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-19 19:04:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-19 19:04:45 +0000 |
commit | 86c77bedd49a4d058e4cb5718c503f65c33c42e7 (patch) | |
tree | c3fbfcb6be5264c8d4b03cf3aecb93dc6ea4d347 | |
parent | 706e2c87dbc7b0a7d91d3e37911128325ac1edf5 (diff) | |
parent | ec201b08b3cfd1e115704abdbd7bc541a3651fe1 (diff) | |
download | redmine-86c77bedd49a4d058e4cb5718c503f65c33c42e7.tar.gz redmine-86c77bedd49a4d058e4cb5718c503f65c33c42e7.zip |
Merged r14030 and r14031.
git-svn-id: http://svn.redmine.org/redmine/branches/3.0-stable@14039 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | extra/sample_plugin/app/models/meeting.rb | 3 | ||||
-rw-r--r-- | lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/extra/sample_plugin/app/models/meeting.rb b/extra/sample_plugin/app/models/meeting.rb index c424bdec4..ca8af1021 100644 --- a/extra/sample_plugin/app/models/meeting.rb +++ b/extra/sample_plugin/app/models/meeting.rb @@ -7,5 +7,6 @@ class Meeting < ActiveRecord::Base :url => Proc.new {|o| {:controller => 'meetings', :action => 'show', :id => o.id}} acts_as_activity_provider :timestamp => 'scheduled_on', - :find_options => { :include => :project } + :scope => includes(:project), + :permission => nil end diff --git a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb index 0637428d5..5e96651ca 100644 --- a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb +++ b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb @@ -29,7 +29,7 @@ module Redmine send :include, Redmine::Acts::ActivityProvider::InstanceMethods end - options.assert_valid_keys(:type, :permission, :timestamp, :author_key, :find_options, :scope) + options.assert_valid_keys(:type, :permission, :timestamp, :author_key, :scope) self.activity_provider_options ||= {} # One model can provide different event types @@ -37,7 +37,6 @@ module Redmine event_type = options.delete(:type) || self.name.underscore.pluralize options[:timestamp] ||= "#{table_name}.created_on" - options[:find_options] ||= {} options[:author_key] = "#{table_name}.#{options[:author_key]}" if options[:author_key].is_a?(Symbol) self.activity_provider_options[event_type] = options end |