This commit is contained in:
benji 2015-09-18 15:53:45 +02:00
parent 397dd169a6
commit b81a615408

View file

@ -45,9 +45,9 @@ class UsersController < ApplicationController
def quickpay
order = @user.orders.build
order.order_items.build(count: 1, product: user.dagschotel)
order.order_items.build(count: 1, product: @user.dagschotel)
if order.save
flash[:success] = "Quick pay succeeded. #{view_context.link_to("Undo", [user, order], method: :delete)}."
flash[:success] = "Quick pay succeeded. #{view_context.link_to("Undo", [@user, order], method: :delete)}."
else
flash[:error] = order.errors.full_messages.first
end