Mercurial > hg > soundsoftware-site
diff plugins/redmine_bibliography/app/models/author.rb @ 1417:1df2db7f0e4d biblio_alt_search_auth
Added a name getter for the Author class.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Tue, 01 Oct 2013 18:18:25 +0100 |
parents | 07444815c0bd |
children | fd6b09e93623 |
line wrap: on
line diff
--- 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