Sha256: a562add7848dd8159c28c0d94010182692e7998b0d0d7c53dfd3a6114b072378

Contents?: true

Size: 474 Bytes

Versions: 48

Compression:

Stored size: 474 Bytes

Contents

json.messages do
  json.array! flash.discard do |type,message|
    json.set! 'type', type
    json.set! 'text', message
  end
end

if @<%= singular_table_name %>.errors.any?
  json.api_errors! '<%= singular_table_name %>', @<%= singular_table_name %>.errors
else
  json.data do
    json.array! [ @<%= singular_table_name %> ] do |<%= singular_table_name %>|
      json.partial! 'details', locals: { <%= singular_table_name %>: <%= singular_table_name %> }
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
incline-0.3.14 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.13 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.12 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.11 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.10 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.9 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.8 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.7 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.6 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.5 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.4 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.3 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.2 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.1 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.3.0 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.2.36 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.2.35 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.2.34 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.2.28 lib/templates/jbuilder/scaffold/show.json.jbuilder
incline-0.2.27 lib/templates/jbuilder/scaffold/show.json.jbuilder