Skip to content

Commit

Permalink
Merge pull request #1400 from tvdeyen/do-not-reload-essence-classes
Browse files Browse the repository at this point in the history
Do not reload essence classes in dev mode
  • Loading branch information
tvdeyen authored Mar 26, 2018
2 parents 9310998 + 9deefa3 commit 79a58e6
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/alchemy/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ class Engine < Rails::Engine
Gutentag.normaliser = ->(value) { value.to_s }
end

# We need to reload each essence class in development mode on every request,
# so it can register itself as essence relation on Page and Element models
#
# @see lib/alchemy/essence.rb:71
config.to_prepare do
unless Rails.configuration.cache_classes
essences = File.join(File.dirname(__FILE__), '../../app/models/alchemy/essence_*.rb')
Dir.glob(essences).each { |essence| load(essence) }
end
end

config.after_initialize do
require_relative './userstamp'
end
Expand Down

0 comments on commit 79a58e6

Please sign in to comment.