Class OffersController
In: app/controllers/offers_controller.rb
Parent: GenericRestController

Methods

Public Instance methods

[Source]

    # File app/controllers/offers_controller.rb, line 29
29:   def place_order
30:     offer = Offer.find params[:id]
31:     @order = find_or_create_current_order_for( offer.store )
32:     @order.add_item( offer )
33:     redirect_to order_url( @order )
34:   end

Protected Instance methods

[Source]

    # File app/controllers/offers_controller.rb, line 38
38:   def new_resource
39:     st_params = (params[:offer] || {}).merge( :store => enclosing_resource )
40:     Offer.new st_params
41:   end

[Validate]