Skip to content

Commit fcb5775

Browse files
committed
Add missing Rails.configuration.to_prepare
1 parent 985c380 commit fcb5775

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

init.rb

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
# frozen_string_literal: true
22

3-
require_relative 'lib/toggl_2_redmine'
3+
Rails.configuration.to_prepare do
4+
require_relative 'lib/toggl_2_redmine'
45

5-
Redmine::Plugin.register :toggl2redmine do
6-
# Package info.
7-
name 'Toggl 2 Redmine'
8-
author 'Jigar Mehta'
9-
description 'Imports time entries from Toggl into Redmine.'
10-
version Toggl2Redmine::VERSION
11-
url 'https://github.com/jigarius/toggl2redmine'
12-
author_url 'https://jigarius.com/'
6+
Redmine::Plugin.register :toggl2redmine do
7+
# Package info.
8+
name 'Toggl 2 Redmine'
9+
author 'Jigarius'
10+
description 'Imports time entries from Toggl into Redmine.'
11+
version Toggl2Redmine::VERSION
12+
url 'https://github.com/jigarius/toggl2redmine'
13+
author_url 'https://jigarius.com/'
1314

14-
# Menu items.
15-
menu :application_menu,
16-
:toggl2redmine,
17-
{ controller: 't2r_import', action: 'index' },
18-
caption: 'Toggl'
19-
end
15+
# Menu items.
16+
menu :application_menu,
17+
:toggl2redmine,
18+
{ controller: 't2r_import', action: 'index' },
19+
caption: 'Toggl'
20+
end
2021

21-
# Patches.
22-
require 'patches/time_entry'
22+
Rails.configuration.to_prepare do
23+
# Patches.
24+
require 'patches/time_entry_patch'
25+
end
26+
end

0 commit comments

Comments
 (0)