From fcb57751736d1706f9c8f0214a87b6f826349429 Mon Sep 17 00:00:00 2001 From: Jigarius Date: Tue, 21 May 2024 14:40:39 +0530 Subject: [PATCH] Add missing Rails.configuration.to_prepare --- init.rb | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/init.rb b/init.rb index b272f592..80c38396 100644 --- a/init.rb +++ b/init.rb @@ -1,22 +1,26 @@ # frozen_string_literal: true -require_relative 'lib/toggl_2_redmine' +Rails.configuration.to_prepare do + require_relative 'lib/toggl_2_redmine' -Redmine::Plugin.register :toggl2redmine do - # Package info. - name 'Toggl 2 Redmine' - author 'Jigar Mehta' - description 'Imports time entries from Toggl into Redmine.' - version Toggl2Redmine::VERSION - url 'https://github.com/jigarius/toggl2redmine' - author_url 'https://jigarius.com/' + Redmine::Plugin.register :toggl2redmine do + # Package info. + name 'Toggl 2 Redmine' + author 'Jigarius' + description 'Imports time entries from Toggl into Redmine.' + version Toggl2Redmine::VERSION + url 'https://github.com/jigarius/toggl2redmine' + author_url 'https://jigarius.com/' - # Menu items. - menu :application_menu, - :toggl2redmine, - { controller: 't2r_import', action: 'index' }, - caption: 'Toggl' -end + # Menu items. + menu :application_menu, + :toggl2redmine, + { controller: 't2r_import', action: 'index' }, + caption: 'Toggl' + end -# Patches. -require 'patches/time_entry' + Rails.configuration.to_prepare do + # Patches. + require 'patches/time_entry_patch' + end +end