Skip to content

Commit

Permalink
Merge pull request #4 from domify/main
Browse files Browse the repository at this point in the history
Added Rails 6 support
  • Loading branch information
fraoustin authored Jan 4, 2023
2 parents c71e4d9 + 3390b73 commit 2fcbc05
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@


def init_redmine_dark
Dir::foreach(File.join(File.dirname(__FILE__), 'lib')) do |file|
next unless /\.rb$/ =~ file
require_dependency file
end
require_dependency Rails.root + "plugins/redmine_dark/lib/dark_application_hooks.rb"
end

if Rails::VERSION::MAJOR >= 5
if Rails::VERSION::MAJOR >= 6
Rails.application.config.after_initialize do
init_redmine_dark
end
elsif Rails::VERSION::MAJOR >= 5
ActiveSupport::Reloader.to_prepare do
init_redmine_dark
end
Expand Down

0 comments on commit 2fcbc05

Please sign in to comment.