Adopt Rails 5 belongs_to_required_by_default
This commit is contained in:
parent
2557645f4f
commit
44a198c7bc
23 changed files with 53 additions and 38 deletions
|
|
@ -76,6 +76,7 @@ class OrdersController < ApplicationController
|
|||
def create
|
||||
@order = Order.new(params[:order])
|
||||
@order.created_by = current_user
|
||||
@order.updated_by = current_user
|
||||
if @order.save
|
||||
flash[:notice] = I18n.t('orders.create.notice')
|
||||
redirect_to @order
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue