class Mongoid::Errors::MongoidError
Public Instance Methods
to_json()
click to toggle source
# File lib/egregious/extensions/mongoid.rb, line 10 def to_json "{\"error\":#{ActiveSupport::JSON.encode(@problem || to_s)}, \"type\":\"#{self.exception_type}\"}" end
to_xml()
click to toggle source
# File lib/egregious/extensions/mongoid.rb, line 6 def to_xml "<errors><error>#{HTMLEntities.new.encode(@problem || to_s)}</error><type>#{self.exception_type}</type></errors>" end