Module: Expirable::ClassMethods
- Defined in:
- app/models/expirable.rb
Instance Method Summary collapse
Instance Method Details
#expired ⇒ Object
32 33 34 |
# File 'app/models/expirable.rb', line 32 def expired where "#{quoted_table_name}.expired_at IS NOT NULL AND #{quoted_table_name}.expired_at < ?", DateTime.now end |
#unexpired ⇒ Object
36 37 38 |
# File 'app/models/expirable.rb', line 36 def unexpired where "#{quoted_table_name}.expired_at IS NULL OR #{quoted_table_name}.expired_at >= ?", DateTime.now end |