Sha256: b6d0afd65b2b1c38193ca2c6a7a3f19bd78e95d441d141928616f0b58b4fef32

Contents?: true

Size: 513 Bytes

Versions: 2

Compression:

Stored size: 513 Bytes

Contents

if USE_MONGOID
  class Product
    include Mongoid::Document

    has_and_belongs_to_many :tags
    belongs_to :vendor

    field :name,        :type => String
    field :url,         :type => String
    field :active,      :type => Boolean
    field :description, :type => String
    field :price,       :type => Fixnum
    field :created_at,  :type => Time
    field :updated_at,  :type => Time
  end
else
  class Product < ActiveRecord::Base

    has_and_belongs_to_many :tags
    belongs_to :vendor

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tabulatr-0.3.0 spec/dummy_app/app/models/product.rb
tabulatr-0.2.0 spec/dummy_app/app/models/product.rb