Sha256: 8a0408f4cbe311bc60822717693858cd5ed72123bd2cdd3cb22470e03b7e82b0
Contents?: true
Size: 703 Bytes
Versions: 19
Compression:
Stored size: 703 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 %><% if attribute.default -%>, default: '<%= attribute.default %>'<% end -%> <% end -%> <% attributes.select{|attr| attr.reference? }.each do |attribute| -%> embedded_in :<%= attribute.name%> <% end -%> end <% end -%>
Version data entries
19 entries across 19 versions & 1 rubygems