Class: ScavengerHunt::Location
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- ScavengerHunt::Location
- Defined in:
- lib/scavenger_hunt/app/models/scavenger_hunt/location.rb
Instance Method Summary collapse
Methods inherited from ApplicationRecord
Instance Method Details
#played?(by) ⇒ Boolean
47 48 49 |
# File 'lib/scavenger_hunt/app/models/scavenger_hunt/location.rb', line 47 def played?(by) by && games.ended.where(player_id: by.id).any? end |
#representations_by_metum(metum_name) ⇒ Object
51 52 53 |
# File 'lib/scavenger_hunt/app/models/scavenger_hunt/location.rb', line 51 def representations_by_metum(metum_name) representations.with_metum_named(metum_name) end |