Class: FourEyes::Action

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/four_eyes/action.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.between_times(start_time, end_time) ⇒ Object



6
7
8
# File 'app/models/four_eyes/action.rb', line 6

def self.between_times(start_time, end_time)
  Action.where('created_at >= ? AND created_at < ?', start_time, end_time)
end

Instance Method Details

#authorized?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/models/four_eyes/action.rb', line 18

def authorized?
  self.status == 'Authorized'
end

#cancelled?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/models/four_eyes/action.rb', line 14

def cancelled?
  self.status == 'Cancelled'
end

#initiated?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/models/four_eyes/action.rb', line 10

def initiated?
  self.status == 'Initiated'
end