comparison plugins/redmine_checkout/lib/checkout/settings_helper_patch.rb @ 1484:51364c0cd58f redmine-2.4-integration

Merge from live branch. Still need to merge manually in files overridden by plugins.
author Chris Cannam
date Wed, 15 Jan 2014 09:59:14 +0000
parents b4b72f1eb644
children
comparison
equal deleted inserted replaced
1464:261b3d9a4903 1484:51364c0cd58f
1 require_dependency 'settings_helper'
2
3 module Checkout
4 module SettingsHelperPatch
5 def self.included(base) # :nodoc:
6 base.send(:include, InstanceMethods)
7
8 base.class_eval do
9 alias_method_chain :administration_settings_tabs, :checkout
10 end
11 end
12
13 module InstanceMethods
14 def administration_settings_tabs_with_checkout
15 tabs = administration_settings_tabs_without_checkout
16 tabs << {:name => 'checkout', :partial => 'settings/checkout', :label => :label_checkout}
17 end
18 end
19 end
20 end
21
22 SettingsHelper.send(:include, Checkout::SettingsHelperPatch)
23