Skip to content

Commit

Permalink
Require rails only if Rails variable is present
Browse files Browse the repository at this point in the history
  • Loading branch information
swistaczek committed Jan 19, 2015
1 parent 45dbee4 commit c66a1c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoid/railties/database.rake
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace :db do

namespace :mongoid do
task :load_models do
::Rails.application.eager_load!
::Rails.application.eager_load! if defined?(Rails)
end
end
end

0 comments on commit c66a1c3

Please sign in to comment.