var data = { id: $(element).data('id'), text: $(element).val() }
callback(data)
def checkout
order = Order.find(params[:order_id])
oc_service = OrderCheckoutService.new(order)
respond_to do |format|
if oc_service.checkout
format.html { render status: :ok }
else
format.html { render status: :unprocessable_entity }
end
end
end