lib/voteable_mongo/railtie.rb in voteable_mongo-0.9.1 vs lib/voteable_mongo/railtie.rb in voteable_mongo-0.9.2
- old
+ new
@@ -2,10 +2,12 @@
module VoteableMongo #:nodoc:
class Railtie < Rails::Railtie #:nodoc:
initializer "preload all application models" do |app|
config.to_prepare do
- ::Rails::Mongoid.load_models(app)
+ if defined?(Mongoid)
+ ::Rails::Mongoid.load_models(app)
+ end
end
end
rake_tasks do
load 'voteable_mongo/railties/database.rake'