parent
872a198016
commit
c0077b2c33
@ -1,25 +0,0 @@ |
||||
module Backlogs |
||||
module VersionsControllerPatch |
||||
def self.included(base) |
||||
base.extend(ClassMethods) |
||||
|
||||
base.class_eval do |
||||
unloadable |
||||
include VersionSettingsHelper |
||||
helper :version_settings |
||||
|
||||
find_project_explicitly_on_update |
||||
end |
||||
end |
||||
|
||||
module ClassMethods |
||||
private |
||||
def find_project_explicitly_on_update |
||||
filter_chain.detect{|m| m.method == :find_project_from_association }.options[:except] << "update" |
||||
filter_chain.detect{|m| m.method == :find_project }.options[:only] << "update" |
||||
end |
||||
end |
||||
end |
||||
end |
||||
|
||||
VersionsController.send(:include, Backlogs::VersionsControllerPatch) |
@ -0,0 +1,18 @@ |
||||
require_dependency 'versions_controller' |
||||
|
||||
module RedmineBacklogs::Patches::VersionsControllerPatch |
||||
def self.included(base) |
||||
base.class_eval do |
||||
unloadable |
||||
|
||||
include VersionSettingsHelper |
||||
helper :version_settings |
||||
|
||||
# find project explicitly on update |
||||
filter_chain.detect { |m| m.method == :find_project_from_association }.options[:except] << "update" |
||||
filter_chain.detect { |m| m.method == :find_project }.options[:only] << "update" |
||||
end |
||||
end |
||||
end |
||||
|
||||
VersionsController.send(:include, RedmineBacklogs::Patches::VersionsControllerPatch) |
Loading…
Reference in new issue