# HG changeset patch # User luisf # Date 1380647905 -3600 # Node ID 1df2db7f0e4db479809afdb5aec6de1fd67e976c # Parent 96ffcd574b961a174e1b5995be24504da9a90aef Added a name getter for the Author class. diff -r 96ffcd574b96 -r 1df2db7f0e4d plugins/redmine_bibliography/app/controllers/publications_controller.rb --- a/plugins/redmine_bibliography/app/controllers/publications_controller.rb Tue Oct 01 15:07:23 2013 +0100 +++ b/plugins/redmine_bibliography/app/controllers/publications_controller.rb Tue Oct 01 18:18:25 2013 +0100 @@ -231,6 +231,8 @@ @results << user unless authors_list.include?(user.author) end + logger.debug { "Autocomplete_for_author results --> #{@results}" } + render :layout => false end diff -r 96ffcd574b96 -r 1df2db7f0e4d plugins/redmine_bibliography/app/models/author.rb --- a/plugins/redmine_bibliography/app/models/author.rb Tue Oct 01 15:07:23 2013 +0100 +++ b/plugins/redmine_bibliography/app/models/author.rb Tue Oct 01 18:18:25 2013 +0100 @@ -34,4 +34,12 @@ end end + def name + if self.authorships.first.nil? + "" + else + self.authorships.first.name + end + end + end