Commit 7564195bacfaebfeaf221401f6aab07ffaf335ba

Authored by Braulio Bhavamitra
2 parents b84467b5 2d4236dc

Merge branch 'display-name-as-short-name' into 'master'

organizations: use display_name on short_name

See merge request !554
Showing 1 changed file with 6 additions and 0 deletions   Show diff stats
app/models/organization.rb
@@ -147,6 +147,12 @@ class Organization < Profile @@ -147,6 +147,12 @@ class Organization < Profile
147 ] 147 ]
148 end 148 end
149 149
  150 + def short_name chars = 40
  151 + s = self.display_name
  152 + s = super(chars) if s.blank?
  153 + s
  154 + end
  155 +
150 def notification_emails 156 def notification_emails
151 emails = [contact_email].select(&:present?) + admins.map(&:email) 157 emails = [contact_email].select(&:present?) + admins.map(&:email)
152 if emails.empty? 158 if emails.empty?