Sha256: d132aa64befbf77c49ca1ca7817969d8e65b70d6a7babd1797950d447be82dfd
Contents?: true
Size: 628 Bytes
Versions: 71
Compression:
Stored size: 628 Bytes
Contents
<% module_namespacing do -%> class <%= class_name %><%= " < #{options[:parent].classify}" if options[:parent] %> <% unless options[:parent] -%> include Mongoid::Document <% end -%> <% if options[:timestamps] -%> include Mongoid::Timestamps <% end -%> <% if options[:collection] -%> store_in collection: "<%= options[:collection] %>" <% end -%> <% attributes.reject{|attr| attr.reference?}.each do |attribute| -%> field :<%= attribute.name %>, type: <%= attribute.type_class %> <% end -%> <% attributes.select{|attr| attr.reference? }.each do |attribute| -%> embedded_in :<%= attribute.name%> <% end -%> end <% end -%>
Version data entries
71 entries across 66 versions & 6 rubygems