lib/rails/mongoid.rb in mongoid-3.0.3 vs lib/rails/mongoid.rb in mongoid-3.0.4
- old
+ new
@@ -116,10 +116,14 @@
#
# @param [ String ] file The base filename.
#
# @since 2.0.0.rc.3
def load_model(file)
- require_dependency(file)
+ begin
+ require_dependency(file)
+ rescue Exception => e
+ Logger.new($stdout).warn(e.message)
+ end
end
# Given the provided file name, determine the model and return the class.
#
# @example Determine the model from the file.