Update templates

This commit is contained in:
Justin Edmund 2020-09-25 10:56:04 -07:00
parent 975dd39ec8
commit 0861968e16
4 changed files with 21 additions and 3 deletions

View file

@ -0,0 +1,18 @@
object false
node :errors do
if @exception.respond_to?(:record)
errors = ValidationErrorsSerializer.new(@exception.record).serialize
end
if @exception.respond_to?(:message) && @exception.respond_to?(:code)
errors = [
{
message: @exception.message,
code: @exception.code
}
]
end
errors
end

View file

@ -1,6 +1,6 @@
object :party
attributes :id, :shortcode
attributes :id, :user_id, :shortcode
node :grid do |p|
partial('grid_weapons/base', :object => p.weapons)

View file

@ -1,7 +1,7 @@
object false
child(@user) {
attributes :id, :email, :username
node(:user) {
@presenter
} unless @user.blank?
node(:error) {