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