Allow to copy articles (PR #673, #541)

This commit is contained in:
JuliusR 2019-10-14 09:25:34 +02:00 committed by wvengen
parent 3ade87167a
commit 71bdf3bfcc
5 changed files with 19 additions and 7 deletions

View file

@ -36,6 +36,11 @@ class ArticlesController < ApplicationController
render :layout => false
end
def copy
@article = @supplier.articles.find(params[:article_id]).dup
render :layout => false
end
def create
@article = Article.new(params[:article])
if @article.valid? && @article.save