Class: BBMB::Html::State::History
- Defined in:
- lib/bbmb/html/state/history.rb
Defined Under Namespace
Classes: HistoryFacade, PositionFacade
Constant Summary collapse
Instance Method Summary collapse
Methods inherited from Global
#direct_arguments, #direct_request?, #initialize, #logout, mandatory, #requested_event, #trigger, #user_input
Constructor Details
This class inherits a constructor from BBMB::Html::State::Global
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 |