Sha256: 4a20458979c5f21bdfb2530e082e67f197d9a1ebd453810cca51ac1575124e11

Contents?: true

Size: 437 Bytes

Versions: 22

Compression:

Stored size: 437 Bytes

Contents

json.id @<%= resource.underscore %>.id.to_s
json.extract! @<%= resource.underscore %><%= 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.partial! 'faalis/relations/belongs_to', object: @<%= resource.underscore %>.<%= name %>, :name => :<%= name %>, :fields => [:id, :name]
<% end %><% end %>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
faalis-2.2.0.pre.rc1 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.2.1 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.2.0 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.1.1 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.1.0 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.8 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.7 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.5 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.4 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.3 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.1 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.0 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.0.rc6 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.0.rc5 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.0.rc4 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.0.rc3 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-2.0.0.rc2 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-1.0.0 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-1.0.0.alpha4 lib/generators/faalis/templates/views/update.json.jbuilder.erb
faalis-1.0.0.alpha3 lib/generators/faalis/templates/views/update.json.jbuilder.erb