Mercurial > hg > soundsoftware-site
changeset 1414:07444815c0bd biblio_alt_search_auth
added a mail getter for the Author model
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Tue, 01 Oct 2013 14:39:12 +0100 |
parents | 0e40e05048eb |
children | 8e2e4557fa75 |
files | plugins/redmine_bibliography/app/models/author.rb |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/redmine_bibliography/app/models/author.rb Tue Oct 01 14:33:00 2013 +0100 +++ b/plugins/redmine_bibliography/app/models/author.rb Tue Oct 01 14:39:12 2013 +0100 @@ -25,4 +25,13 @@ self.authorships.first.institution end end + + def mail + if self.authorships.first.nil? + "" + else + self.authorships.first.mail + end + end + end