Skip to content

Commit

Permalink
Use code variable in creation of Error class
Browse files Browse the repository at this point in the history
  • Loading branch information
pisaacs committed Nov 14, 2015
1 parent 7e7ca4f commit 9f36b4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stitches/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def self.from_active_record_object(object)
else
object.errors.full_messages_for(field).sort.join(', ')
end
Stitches::Error.new(code: "#{field}_invalid".parameterize, message: message)
Stitches::Error.new(code: code, message: message)
}
self.new(errors)
end
Expand Down

0 comments on commit 9f36b4c

Please sign in to comment.