Sha256: 6ce80121f7f614252361b7805cfaac48b83b85fd321ab3d0c4ec57fdc5eb4ba9
Contents?: true
Size: 652 Bytes
Versions: 193
Compression:
Stored size: 652 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%>, :inverse_of => :<%= class_name.tableize %> <% end -%> end <% end -%>
Version data entries
193 entries across 101 versions & 5 rubygems