Sha256: eae0a262dc34d293afbce2b0af9ebe2626abe36bdf07a3233e69e5f2ddd9967d
Contents?: true
Size: 605 Bytes
Versions: 24
Compression:
Stored size: 605 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[:versioning] -%> include Mongoid::Versioning <% 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
24 entries across 24 versions & 2 rubygems