@user
This commit is contained in:
parent
397dd169a6
commit
b81a615408
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue