Module: Retirement
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/concerns/retirement.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#retire! ⇒ Object
15 16 17 18 |
# File 'app/concerns/retirement.rb', line 15 def retire! update_column(:retired_at, Time.now) freeze end |
#retired? ⇒ Boolean
24 25 26 |
# File 'app/concerns/retirement.rb', line 24 def retired? retired_at.present? end |
#unretire! ⇒ Object
20 21 22 |
# File 'app/concerns/retirement.rb', line 20 def unretire! update_column(:retired_at, nil) end |