Skip to content

Commit 08935a6

Browse files
committed
fix for generators required
1 parent 0ec3300 commit 08935a6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/knock/engine.rb

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
module Knock
22
class Engine < ::Rails::Engine
33
config.eager_load_paths += Dir["#{config.root}/lib/**/"]
4+
# https://github.com/nsarno/knock/issues/156
5+
if ::Rails.const_defined? 'Generators'
6+
config.eager_load_paths += Dir["#{config.root}/lib/**/"]
7+
else
8+
require_relative './authenticable'
9+
end
410
isolate_namespace Knock
511
end
612
end

0 commit comments

Comments
 (0)