# HG changeset patch # User luisf # Date 1380634752 -3600 # Node ID 07444815c0bdb606f26937c7333423ad236403e9 # Parent 0e40e05048eb7eb748b0221c6eae15cfd7673c83 added a mail getter for the Author model diff -r 0e40e05048eb -r 07444815c0bd plugins/redmine_bibliography/app/models/author.rb --- 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