Class: BBMB::Html::State::Result
- Inherits:
-
Global
- Object
- SBSM::State
- Global
- BBMB::Html::State::Result
show all
- Defined in:
- lib/bbmb/html/state/result.rb
Defined Under Namespace
Classes: Result
Constant Summary
collapse
- VIEW =
View::Result
Instance Method Summary
collapse
Methods inherited from Global
#direct_arguments, #direct_request?, #initialize, #logout, mandatory, #requested_event, #trigger, #user_input
Instance Method Details
#_order ⇒ Object
58
59
60
|
# File 'lib/bbmb/html/state/result.rb', line 58
def _order
_customer.current_order
end
|
#direct_argument_keys ⇒ Object
52
53
54
|
# File 'lib/bbmb/html/state/result.rb', line 52
def direct_argument_keys
[:query]
end
|
#direct_event ⇒ Object
55
56
57
|
# File 'lib/bbmb/html/state/result.rb', line 55
def direct_event
[:search, {:query => @query}]
end
|
#init ⇒ Object
44
45
46
47
48
49
50
51
|
# File 'lib/bbmb/html/state/result.rb', line 44
def init
@query = @session.persistent_user_input(:query)
products = Model::Product.search_by_description(@query)
unless(@session.lookandfeel.enabled? :free_products, false)
products = products.select { |product| product.price }
end
@model = Result.new _order, products
end
|