Sha256: 8dfbde46a51dbd1e35a5420c6439bfac2962c4fa33e4dca0fa9fd765000471e2

Contents?: true

Size: 425 Bytes

Versions: 3

Compression:

Stored size: 425 Bytes

Contents

class PersonWithTimestamp < MassiveRecord::ORM::Table
  column_family :info do
    field :name
    field :email
    field :age, :integer
    field :points, :integer, :default => 1, :column => :pts
    field :date_of_birth, :date
    field :status, :boolean, :default => false
    field :dictionary, :hash, :default => {}

    timestamps
  end

  validates_presence_of :name

  private

  def default_id
    next_id
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
massive_record-0.2.2 spec/orm/models/person_with_timestamp.rb
massive_record-0.2.2.rc2 spec/orm/models/person_with_timestamp.rb
massive_record-0.2.2.rc1 spec/orm/models/person_with_timestamp.rb