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

Version Path
rails3_artifactor-0.4.0 lib/rails3_artifactor/artifact/orm/mongoid.rb
rails3_artifactor-0.3.2 lib/rails3_artifactor/artifact/orm/mongoid.rb
rails3_artifactor-0.3.1 lib/rails3_artifactor/artifact/orm/mongoid.rb
rails3_artifactor-0.3.0 lib/rails3_artifactor/artifact/orm/mongoid.rb
rails3_artifactor-0.2.8 lib/rails3_artifactor/artifact/orm/mongoid.rb
rails3_artifactor-0.2.7 lib/rails3_artifactor/artifact/orm/mongoid.rb
rails3_artifactor-0.2.6 lib/rails3_artifactor/artifact/orm/mongoid.rb
rails3_artifactor-0.2.5 lib/rails3_artifactor/artifact/orm/mongoid.rb
rails3_artifactor-0.2.4 lib/rails3_artifactor/artifact/orm/mongoid.rb
rails3_artifactor-0.2.3 lib/rails3_artifactor/artifact/orm/mongoid.rb
rails3_artifactor-0.2.2 lib/rails3_artifactor/artifact/orm/mongoid.rb