We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01d10e0 commit 64f807bCopy full SHA for 64f807b
1 file changed
app/controllers/registers_controller.rb
@@ -283,9 +283,9 @@ def coauthors_commit
283
RegisterCoauthor.find_by(rc_par).tap(&:move_up)
284
else
285
rc_par.merge!(order: @register.register_coauthors.size + 1)
286
- RegisterCoauthor.create(rc_par)
+ RegisterCoauthor.new(rc_par).tap(&:save)
287
end
288
-
+
289
if rc && !rc.errors.present?
290
flash[:notice] = 'Successfully updated coauthors'
291
redirect_back(fallback_location: @register)
0 commit comments