Sha256: 01e0f632a4250ff54df7095b2aa2598dd02f9ca4fc99f79f84fd8ec9350a6baa
Contents?: true
Size: 716 Bytes
Versions: 17
Compression:
Stored size: 716 Bytes
Contents
class <%= class_name %><%= "< #{options[:parent].classify}" if options[:parent] %> <% unless options[:parent] -%> include MongoMapper::Document timestamps! # Validations ::::::::::::::::::::::::::::::::::::::::::::::::::::: # validates_presence_of :attribute # Assocations ::::::::::::::::::::::::::::::::::::::::::::::::::::: # belongs_to :model # many :model # one :model # Callbacks ::::::::::::::::::::::::::::::::::::::::::::::::::::::: # before_create :your_model_method # after_create :your_model_method # before_update :your_model_method <% end -%> <% attributes.each do |attribute| -%> key :<%= attribute.name %>, <%= attribute.type_class %> <% end -%> end
Version data entries
17 entries across 17 versions & 2 rubygems