Sha256: 2443db3c36884eabc22b81083df740f421ed2b8393da79ef9a066d8c1257e48c
Contents?: true
Size: 499 Bytes
Versions: 11
Compression:
Stored size: 499 Bytes
Contents
module Rails3::Assist::Orm module Mongoid include Rails3::Assist::Orm::Base def orm_name 'Mongoid' end def field_name 'field' end def new_model_content name, options={}, &block content = block ? yield : options[:content] file_w_include(name, orm_marker_name(name, options)) { content } end def field name, type = nil return "#{field_name} :#{name}, :type => #{type}" if type "#{field_name} :#{name}" end end end
Version data entries
11 entries across 11 versions & 1 rubygems