Sha256: 40d2d76bbe56d242ef00935eb5a884aa524aa3a37d99339aa30acf8d6dd7dd98

Contents?: true

Size: 310 Bytes

Versions: 1

Compression:

Stored size: 310 Bytes

Contents

##
## SQL
##
class Iro::Stock < ApplicationRecord
  self.table_name = 'iro_stocks'

  STATUS_ACTIVE   = 'active'
  STATUS_INACTIVE = 'inactive'
  STATUSES        = [ 'active', 'inactive' ]

  validates :ticker, uniqueness: true, presence: true

  def self.active
    where( status: STATUS_ACTIVE )
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
iron_warbler-2.0.7.1 app/models/iro/stock.rb