Class: Iro::Alert

Inherits:
ApplicationRecord show all
Defined in:
app/models/iro/alert.rb

Constant Summary collapse

DIRECTION_ABOVE =
'ABOVE'
DIRECTION_BELOW =
'BELOW'
STATUS_ACTIVE =
'active'
STATUS_INACTIVE =
'inactive'
STATUSES =
[ 'active', 'inactive' ]

Class Method Summary collapse

Class Method Details

.activeObject



17
18
19
# File 'app/models/iro/alert.rb', line 17

def self.active
  where( status: STATUS_ACTIVE )
end

.directions_listObject



8
9
10
# File 'app/models/iro/alert.rb', line 8

def self.directions_list
  [ nil, DIRECTION_ABOVE, DIRECTION_BELOW ]
end