Skip to content

Commit

Permalink
Require just rails/engine
Browse files Browse the repository at this point in the history
A blank rails engine generated by rails doesn't require anything...[1]

Other engines do the sensible thing: require what they need [2]

We shouldn't make assumptions about the rails features the application
using the engine will want to use.

[1]
https://github.com/rails/rails/blob/0e453e9150f0ac9fa2bdff4511c3c806a3e45f49/railties/lib/rails/generators/rails/plugin/templates/lib/%25namespaced_name%25/engine.rb

[2] https://github.com/rails/coffee-rails/blob/db0659924c82f24e2665d799b1ab342078f2501d/lib/coffee/rails/engine.rb#L1
  • Loading branch information
jrafanie committed May 26, 2017
1 parent bd5bb97 commit 17ddc3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/manageiq/content/engine.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'rails/all'
require 'rails/engine'

module ManageIQ
module Content
Expand Down

0 comments on commit 17ddc3d

Please sign in to comment.