Fixed saving user for new orders.

This commit is contained in:
Benjamin Meichsner 2013-01-26 16:24:45 +01:00
parent 44ef0a9807
commit 8b2b70f8bf
3 changed files with 3 additions and 4 deletions

View file

@ -60,6 +60,7 @@ class OrdersController < ApplicationController
# order_articles will be saved in Order.article_ids=()
def create
@order = Order.new(params[:order])
@order.created_by = current_user
if @order.save
flash[:notice] = "Die Bestellung wurde erstellt."
redirect_to @order