Module: Card::Set::All::Error::JsonFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod004-format/all/error.rb

Instance Method Summary collapse

Instance Method Details

#view: bad_addressObject



75
76
77
78
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/error.rb', line 75

view :bad_address do
  card.errors.add :address, super()
  render_errors
end

#view: denialObject



73
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/error.rb', line 73

view :denial, :errors

#view: errorsObject



65
66
67
68
69
70
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/error.rb', line 65

view :errors do
  {
    error_status: error_status,
    errors: card.errors.each_with_object({}) { |e, h| h[e.attribute] = e.message }
  }
end

#view: not_foundObject



74
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/error.rb', line 74

view :not_found, :errors

#view: server_errorObject



72
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/error.rb', line 72

view :server_error, :errors