forked from jrupesh/redmine_my_page
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rb
26 lines (22 loc) · 1.01 KB
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'redmine'
require 'my_page_patches/my_controller_patch'
require 'my_page_patches/activities_controller_patch'
require 'my_page_patches/user_preference_patch'
require 'my_page_patches/welcome_controller_patch'
ActionDispatch::Callbacks.to_prepare do
require_dependency 'my_page_patches/redmine_my_page_hook'
end
Redmine::Plugin.register :redmine_my_page do
name 'My Page Customization'
author 'Rupesh J'
description 'Adds additional options to the My Page of users.\nCustom Queries and Activities ( filtered ) will be shown in a single page.'
version '0.1.9'
settings :default => { 'my_activity_enable' => false },
:partial => 'settings/my_page_option_settings'
Rails.configuration.to_prepare do
MyController.send :include, MyPagePatches::MyControllerPatch
ActivitiesController.send(:include, MyPagePatches::ActivitiesControllerPatch)
WelcomeController.send(:include, MyPagePatches::WelcomeControllerPatch)
UserPreference.send(:include, MyPagePatches::UserPreferencePatch)
end
end