File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 42
42
# Automatically encode points to geojson with as_json in rails3
43
43
RGeo ::ActiveRecord ::GeometryMixin . set_json_generator ( :geojson )
44
44
45
- RedmineGtt . setup
45
+ RedmineGtt . setup_normal_patches
46
46
47
47
# ActiveRecord::Base.include_root_in_json = true
48
48
# module RGeo
56
56
# end
57
57
end
58
58
59
+ Rails . configuration . to_prepare do
60
+ RedmineGtt . setup_controller_patches
61
+ end
62
+
59
63
class GttListener < Redmine ::Hook ::ViewListener
60
64
render_on :view_layouts_base_html_head , inline : <<-END
61
65
<%= stylesheet_link_tag 'gtt', :plugin => 'redmine_gtt' %>
Original file line number Diff line number Diff line change 28
28
29
29
module RedmineGtt
30
30
31
- def self . setup
31
+ def self . setup_normal_patches
32
32
RedmineGtt ::Patches ::IssuesHelperPatch . apply
33
33
34
34
RedmineGtt ::Patches ::IssuePatch . apply
35
35
RedmineGtt ::Patches ::IssueQueryPatch . apply
36
36
RedmineGtt ::Patches ::ProjectPatch . apply
37
37
RedmineGtt ::Patches ::UserPatch . apply
38
38
39
+ RedmineGtt ::Patches ::ProjectsHelperPatch . apply
40
+
41
+ # unless IssueQuery.included_modules.include?(RedmineGtt::Patches::IssueQueryPatch)
42
+ # IssueQuery.send(:include, RedmineGtt::Patches::IssueQueryPatch)
43
+ # end
44
+
45
+
46
+ #Redmine::Views::ApiTemplateHandler.send(:prepend, RedmineGtt::Patches::ApiTemplateHandlerPatch)
47
+ end
48
+
49
+ def self . setup_controller_patches
50
+
39
51
RedmineGtt ::Patches ::IssuesControllerPatch . apply
40
52
RedmineGtt ::Patches ::ProjectsControllerPatch . apply
41
- RedmineGtt ::Patches ::ProjectsHelperPatch . apply
42
53
RedmineGtt ::Patches ::UsersControllerPatch . apply
43
54
44
55
[
@@ -47,13 +58,6 @@ def self.setup
47
58
ProjectsController ,
48
59
UsersController ,
49
60
] . each { |c | c . send :helper , 'gtt_map' }
50
-
51
- # unless IssueQuery.included_modules.include?(RedmineGtt::Patches::IssueQueryPatch)
52
- # IssueQuery.send(:include, RedmineGtt::Patches::IssueQueryPatch)
53
- # end
54
-
55
-
56
- #Redmine::Views::ApiTemplateHandler.send(:prepend, RedmineGtt::Patches::ApiTemplateHandlerPatch)
57
61
end
58
62
end
59
63
You can’t perform that action at this time.
0 commit comments