Class: Spree::ProductViewsToPurchasesReport::Result::Observation
- Inherits:
-
Report::Observation
- Object
- Report::Observation
- Spree::ProductViewsToPurchasesReport::Result::Observation
- Defined in:
- app/reports/spree/product_views_to_purchases_report.rb
Instance Method Summary collapse
-
#purchase_to_view_ratio ⇒ Object
This is inconsistent across postgres and mysql.
Methods inherited from Report::Observation
build_from_hash, build_from_list, #initialize, observation_fields, #to_h
Constructor Details
This class inherits a constructor from Spree::Report::Observation
Instance Method Details
#purchase_to_view_ratio ⇒ Object
This is inconsistent across postgres and mysql
12 13 14 |
# File 'app/reports/spree/product_views_to_purchases_report.rb', line 12 def purchase_to_view_ratio # This is inconsistent across postgres and mysql (purchases.to_f / views.to_f).round(2) end |