Sha256: 7ce15cf9b8c9c00f83c9d0da57f18faca55ed545161859876dfd6daf3a341514

Contents?: true

Size: 389 Bytes

Versions: 16

Compression:

Stored size: 389 Bytes

Contents

json.extract! @<%= resource.underscore %>, :id<%= fields_as_params %>
<% fields.each do |name, type| %><% if type == "has_many" %>json.<%= name %> @<%= resource.underscore %>.<%= name %>, :id, :name
<% end %><% if type == "belongs_to" %>json.<%= name %> do
  json.id @<%= resource.underscore %>.<%= name %>_id
  json.name @<%= resource.underscore %>.<%= name %>.name
end<% end %><% end %>

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
faalis-0.17.0 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.16.3 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.16.1 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.16.0 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.15.1 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.15.0 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.14.4 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.14.3 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.14.2 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.14.0 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.11.1 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.11.0 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-0.7.0 lib/generators/faalis/templates/views/update.json.jbuilder.erb
red_base-0.6.0 lib/generators/red_base/templates/views/update.json.jbuilder.erb
red_base-0.5.1 lib/generators/red_base/templates/views/update.json.jbuilder.erb
red_base-0.5.0 lib/generators/red_base/templates/views/update.json.jbuilder.erb