Class: CheckByNormal
Overview
this class provides the funcationality of listing all the products available for that particular store
Instance Method Summary collapse
-
#initialize(param) ⇒ CheckByNormal
constructor
this method initializes base class object with the store detail.
-
#my_special_method(pages) ⇒ Object
this method to run the logic of listing the products with pagination.
-
#my_special_method_without(member) ⇒ Object
this method to run the logic of listing the products without pagination.
Methods inherited from BasicWay
Constructor Details
#initialize(param) ⇒ CheckByNormal
this method initializes base class object with the store detail
90 91 92 |
# File 'lib/product_home_template.rb', line 90 def initialize(param) super(param) end |
Instance Method Details
#my_special_method(pages) ⇒ Object
this method to run the logic of listing the products with pagination
95 96 97 98 99 |
# File 'lib/product_home_template.rb', line 95 def my_special_method(pages) @products = @store_detail.products.paginate(page: pages, per_page: 3) puts("=== by baisc page ===") return @products end |
#my_special_method_without(member) ⇒ Object
this method to run the logic of listing the products without pagination
102 103 104 105 |
# File 'lib/product_home_template.rb', line 102 def my_special_method_without(member) @products = @store_detail.products return @products end |