Skip to content

Commit

Permalink
Typo in config.to_prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
Bramjetten committed Jul 24, 2017
1 parent c12540a commit 739e0f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/spina/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ class Engine < ::Rails::Engine
config.assets.paths << config.root.join('vendor', 'assets')

config.to_prepare do
# Require decorators from main application
[Rails.root].flatten.map { |p| Dir[p.join('app', 'decorators', '**', '*_decorator.rb')]}.flatten.uniq.each do |decorator|
Rails.configuration.cache_classes ? require(decorator) : load(decorator)
end

# Load helpers from main application
Spina::ApplicationController.helper Rails.application.helpers
end
end

end
Expand Down

0 comments on commit 739e0f9

Please sign in to comment.