Skip to content

Commit

Permalink
paper authors are now saved, solved #32
Browse files Browse the repository at this point in the history
  • Loading branch information
akuchinke committed Nov 9, 2017
1 parent 8273dd0 commit d2f62f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/papers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def show
end

def new
@paper = Paper.new
@paper = Paper.new()

end

Expand All @@ -19,7 +19,7 @@ def edit

def create
@paper = Paper.new(paper_params)
@paper.authors=[]


if @paper.save
redirect_to @paper
Expand All @@ -46,6 +46,6 @@ def destroy

private
def paper_params
params.require(:paper).permit(:title, :venue, :year, :author)
params.require(:paper).permit(:title, :venue, :year, :author_ids => [])
end
end

0 comments on commit d2f62f6

Please sign in to comment.