lib/mongoid/errors/missing_field.rb in mongoid_touch-0.0.4 vs lib/mongoid/errors/missing_field.rb in mongoid_touch-0.1.0
- old
+ new
@@ -1,12 +1,12 @@
# encoding: utf-8
module Mongoid
module Errors
class MissingField < MongoidError
- def initialize(name)
+ def initialize(name, instance)
super(
- translate("missing_field", { :name => name })
+ translate("touch.missing_field", { :name => name.to_s, :instance => instance.to_s })
)
end
end
end
end