use built-in methods instead of self-cooked ones

pull/2708/head
Jan Sandbrink 10 years ago
parent be9a85299e
commit f83dd8ee20
  1. 3
      lib/open_project/plugins/acts_as_op_engine.rb

@ -144,8 +144,7 @@ module OpenProject::Plugins
base.send(:define_method, :add_api_path) do |path_name, &block|
config.to_prepare do
::API::V3::Utilities::PathHelper::ApiV3Path.class_eval do
metaclass = class << self; self; end
metaclass.instance_eval do
singleton_class.instance_eval do
define_method path_name, &block
end
end

Loading…
Cancel
Save