Skip to content

Commit

Permalink
DONT load everything under lib.
Browse files Browse the repository at this point in the history
  • Loading branch information
ngty committed Sep 14, 2017
1 parent 0e3bc6d commit 97fb32f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/knock/engine.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
module Knock
class Engine < ::Rails::Engine
config.eager_load_paths += Dir["#{config.root}/lib/**/"]

if ::Rails.const_defined? 'Generators'
config.eager_load_paths += Dir["#{config.root}/lib/**/"]
else
require_relative './authenticable'
end

isolate_namespace Knock
end
end

0 comments on commit 97fb32f

Please sign in to comment.