Class: Effective::Ring
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Effective::Ring
- Defined in:
- app/models/effective/ring.rb
Constant Summary collapse
- SIZES =
[3, 4, 5, 6, 7, 8]
- TITANIUM_SIZES =
[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
- METALS =
['14k Yellow Gold', 'Sterling Silver', 'Titanium']
Instance Method Summary collapse
Instance Method Details
#issued? ⇒ Boolean
59 60 61 |
# File 'app/models/effective/ring.rb', line 59 def issued? issued_at.present? end |
#mark_as_issued! ⇒ Object
51 52 53 |
# File 'app/models/effective/ring.rb', line 51 def mark_as_issued! update!(issued_at: Time.zone.now) end |
#submitted? ⇒ Boolean
55 56 57 |
# File 'app/models/effective/ring.rb', line 55 def submitted? purchased? end |
#to_s ⇒ Object
47 48 49 |
# File 'app/models/effective/ring.rb', line 47 def to_s ["Chemist's Ring", (" - #{} size #{size}" if .present? && size.present?)].compact.join end |