Method: Exceptions::Model#build_nested

Defined in:
lib/exceptions/model.rb

#build_nestedObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/exceptions/model.rb', line 9

def build_nested
	{ 
		error: { 
			model: self.nested_model.camelcase, 
			field: "#{self.nested_model}[#{self.nested_attr}]",
			attribute: self.nested_attr, 
			message: self.message,
			full_message: "#{self.nested_attr_human} #{self.message}"
		} 
	}
end