Skip to content

Commit

Permalink
Merge pull request mongodb#3922 from swistaczek/master
Browse files Browse the repository at this point in the history
Require rails only if Rails variable is present
  • Loading branch information
arthurnn committed Jan 23, 2015
2 parents 45dbee4 + c66a1c3 commit 3cf8ebc
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 3cf8ebc

Please sign in to comment.