diff --git a/init.rb b/init.rb index 28c09f6..eb10446 100644 --- a/init.rb +++ b/init.rb @@ -18,4 +18,6 @@ Redmine::Plugin.register :stopwatch do if: ->(*_){ User.current.logged? and User.current.allowed_to?(:log_time, nil, global: true) } end -Stopwatch.setup +Rails.application.config.to_prepare do + Stopwatch.setup +end