Sha256: 66b997c9e4cfb6ad4c07e8b50b0f5dc6dde583eb20da563ace521497be34df71
Contents?: true
Size: 627 Bytes
Versions: 65
Compression:
Stored size: 627 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| -%> belongs_to :<%= attribute.name%> <% end -%> end <% end -%>
Version data entries
65 entries across 65 versions & 2 rubygems