changeset 1412:48d9b3ae9e1a biblio_alt_search_auth

Added an institution setter to the Author model
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 01 Oct 2013 14:29:01 +0100
parents 6487f22bee9d
children 0e40e05048eb
files plugins/redmine_bibliography/app/models/author.rb
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/redmine_bibliography/app/models/author.rb	Tue Oct 01 14:23:36 2013 +0100
+++ b/plugins/redmine_bibliography/app/models/author.rb	Tue Oct 01 14:29:01 2013 +0100
@@ -18,4 +18,7 @@
     }
   }
 
+  def institution
+    self.authorship.first.institution
+  end
 end