Sha256: 871dd921a3d4a15635cbd4716b933218cabf0c9ae98b621dcaacf6becc845bc5

Contents?: true

Size: 493 Bytes

Versions: 6

Compression:

Stored size: 493 Bytes

Contents

module RailsAssist::Orm
  module Mongoid
    include RailsAssist::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

6 entries across 6 versions & 1 rubygems

Version Path
rails_artifactor-0.5.0 lib/rails_artifactor/artifact/orm/mongoid.rb
rails_artifactor-0.4.0 lib/rails_artifactor/artifact/orm/mongoid.rb
rails_artifactor-0.3.6 lib/rails_artifactor/artifact/orm/mongoid.rb
rails_artifactor-0.3.5 lib/rails_artifactor/artifact/orm/mongoid.rb
rails_artifactor-0.3.4 lib/rails_artifactor/artifact/orm/mongoid.rb
rails_artifactor-0.3.3 lib/rails_artifactor/artifact/orm/mongoid.rb