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