Class: Product
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Product
- Includes:
- ActionView::Helpers::NumberHelper
- Defined in:
- app/models/product.rb
Instance Method Summary collapse
Instance Method Details
#photos? ⇒ Boolean
8 9 10 |
# File 'app/models/product.rb', line 8 def photos? self.photos.present? end |
#price? ⇒ Boolean
12 |
# File 'app/models/product.rb', line 12 def price? ; self.price_exists?(self.price) ; end |
#pricef ⇒ Object
13 |
# File 'app/models/product.rb', line 13 def pricef ; self.format_price(self.price) ; end |
#sale? ⇒ Boolean
15 |
# File 'app/models/product.rb', line 15 def sale? ; self.price_exists?(self.sale_price) ; end |
#sale_pricef ⇒ Object
16 |
# File 'app/models/product.rb', line 16 def sale_pricef ; self.format_price(self.sale_price) ; end |