Revert unused method parameter

pull/216/head
Hagen Schink 11 years ago
parent 13dc8baff6
commit 8aa098ba2c
  1. 2
      lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb
  2. 4
      lib/plugins/acts_as_watchable/lib/acts_as_watchable/routes.rb

@ -49,7 +49,7 @@ module Redmine
send :include, Redmine::Acts::Watchable::InstanceMethods
alias_method_chain :watcher_user_ids=, :uniq_ids
OpenProject::Acts::Watchable::Routes.add_watched(self, options[:route_prefix])
OpenProject::Acts::Watchable::Routes.add_watched(options[:route_prefix] || self.to_s.underscore.pluralize)
end
end

@ -22,12 +22,12 @@ module OpenProject
/\d+/.match(params[:object_id])
end
def self.add_watched(watched, options = nil)
def self.add_watched(watched)
objects_base_klass = get_objects_base_class watched
self.models ||= []
self.models << ((options.nil?) ? watched.to_s : options)
self.models << ((objects_base_klass.nil?) ? watched.to_s : objects_base_klass.to_s)
end
private

Loading…
Cancel
Save