Sha256: 0d09e4a68761df0e79cf146e3f2ce5d521f8d7edbbe3f70fbb948ba4f6892d2f
Contents?: true
Size: 646 Bytes
Versions: 12
Compression:
Stored size: 646 Bytes
Contents
class <%= namespace %>.Models.<%= class_name %> extends <%= namespace %>.Models.Base props: <% fields.each do |field| -%> <% if field.reference? -%> <%= sprintf("%-#{max_field_length}s",field.name+'_id') %>: "<%= field.client_type %>" <% else -%> <%= sprintf("%-#{max_field_length}s",field.name) %>: "<%= field.client_type %>" <% end -%> <% end %> <% if reference_fields.any? -%> associations: <% reference_fields.each do |field| -%> <%= sprintf("%-#{max_field_length}s ",field.name) %>: { <%= field.belongs_to? ? 'model' : 'collection' -%>: "<%= namespace %>.<%= field.name.camelize %>" } <% end -%> <% end -%>
Version data entries
12 entries across 12 versions & 1 rubygems