]> source.dussan.org Git - redmine.git/commitdiff
Removed no longer used :find_options option for acts_as_activity_provider.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 18 Feb 2015 21:10:22 +0000 (21:10 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 18 Feb 2015 21:10:22 +0000 (21:10 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@14030 e93f8b46-1217-0410-a6f0-8f06a7374b81

extra/sample_plugin/app/models/meeting.rb
lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb

index c424bdec4138da8f30c8575bc212d790bba2b24b..62dcd8abe00e135e9632a6c9fca2280a202f6172 100644 (file)
@@ -7,5 +7,5 @@ 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)
 end
index 0637428d53acc0bd5bc42374549aa09269890c5a..5e96651ca2e5732e99c454f41fa8a72e49aba7bb 100644 (file)
@@ -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