Class: Gamification::Reward

Inherits:
ApplicationRecord show all
Defined in:
app/models/gamification/reward.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.seeObject



26
27
28
# File 'app/models/gamification/reward.rb', line 26

def see
  all.map { |reward| reward.see }
end

Instance Method Details

#seeObject



17
18
19
# File 'app/models/gamification/reward.rb', line 17

def see
  touch :seen_at
end

#seen?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'app/models/gamification/reward.rb', line 21

def seen?
  !!seen_at
end