changeset 1399:6106c49c5f50 biblio_alt_search_auth

fixed bug when associating author and user.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 30 Sep 2013 13:50:17 +0100
parents 92d854be33d5
children 5cb7eeccede1
files plugins/redmine_bibliography/app/models/authorship.rb
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/redmine_bibliography/app/models/authorship.rb	Sat Sep 28 16:22:56 2013 +0100
+++ b/plugins/redmine_bibliography/app/models/authorship.rb	Mon Sep 30 13:50:17 2013 +0100
@@ -128,7 +128,8 @@
         # create new author and update user
         author = Author.new
         author.save
-        user << author
+        user.author = author
+        user.save
       else
         logger.error { "found an author!" }
         author = user.author