Sha256: 1242899d7c82071b4bdc0615496ed0e5d76eeae9060769beba179fff70c9a7c1
Contents?: true
Size: 700 Bytes
Versions: 8
Compression:
Stored size: 700 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 -%> <% 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
8 entries across 8 versions & 1 rubygems