Class: BBMB::Html::State::History
- Inherits:
-
Global
- Object
- SBSM::State
- Global
- BBMB::Html::State::History
show all
- Defined in:
- lib/bbmb/html/state/history.rb
Defined Under Namespace
Classes: HistoryFacade, PositionFacade
Constant Summary
collapse
- VIEW =
View::History
Instance Method Summary
collapse
Methods inherited from Global
#direct_arguments, #direct_request?, #logout, mandatory, #requested_event, #trigger, #user_input
Instance Method Details
#direct_argument_keys ⇒ Object
86
87
88
|
# File 'lib/bbmb/html/state/history.rb', line 86
def direct_argument_keys
[:customer_id]
end
|
#direct_event ⇒ Object
89
90
91
|
# File 'lib/bbmb/html/state/history.rb', line 89
def direct_event
[:history, {:customer_id => @customer.customer_id}]
end
|
#init ⇒ Object
78
79
80
81
82
83
84
85
|
# File 'lib/bbmb/html/state/history.rb', line 78
def init
@model = HistoryFacade.new
if(@customer = _customer)
@customer.orders.sort_by { |order| order.commit_time }.each { |order|
@model.add(order)
}
end
end
|