Skip to content

Commit 64f807b

Browse files
committed
Update registers_controller.rb
1 parent 01d10e0 commit 64f807b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/controllers/registers_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ def coauthors_commit
283283
RegisterCoauthor.find_by(rc_par).tap(&:move_up)
284284
else
285285
rc_par.merge!(order: @register.register_coauthors.size + 1)
286-
RegisterCoauthor.create(rc_par)
286+
RegisterCoauthor.new(rc_par).tap(&:save)
287287
end
288-
288+
289289
if rc && !rc.errors.present?
290290
flash[:notice] = 'Successfully updated coauthors'
291291
redirect_back(fallback_location: @register)

0 commit comments

Comments
 (0)