Sha256: ec59f5d4ba063ae90fc3b661ce5efe3729296297d1e80d9b852a17d09c286c31
Contents?: true
Size: 425 Bytes
Versions: 22
Compression:
Stored size: 425 Bytes
Contents
json.id @<%= resource.underscore %>.id.to_s json.extract! @<%= resource.underscore %><%= fields_as_params %><% fields.each do |name, type| %> <% case type when "belongs_to" %> json.partial! 'faalis/relations/belongs_to', object: @<%= resource.underscore %>.<%= name %>, :name => :<%= name %>, :fields => [:id, :name] <% when "has_many" %>json.<%= name %> @<%= resource.underscore %>.<%= name %>, :id, :name<% end %><% end %>
Version data entries
22 entries across 22 versions & 1 rubygems