Sha256: 48c5824478db5f7d73225999792263a718799cce37938955a08be946f43839b5

Contents?: true

Size: 315 Bytes

Versions: 6

Compression:

Stored size: 315 Bytes

Contents

##
## SQL
##
class Iro::Stock < Iro::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

6 entries across 6 versions & 1 rubygems

Version Path
iron_warbler-2.0.7.7 app/models/iro/stock.rb
iron_warbler-2.0.7.6 app/models/iro/stock.rb
iron_warbler-2.0.7.5 app/models/iro/stock.rb
iron_warbler-2.0.7.4 app/models/iro/stock.rb
iron_warbler-2.0.7.3 app/models/iro/stock.rb
iron_warbler-2.0.7.2 app/models/iro/stock.rb