From 39ea5c373537dffcc2c1b84795b9614624910ffd Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Sat, 20 Oct 2018 13:04:39 +0200 Subject: [PATCH] fix granted hat bubble --- app/models/hat.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/hat.rb b/app/models/hat.rb index 175a6d3..69b1a9c 100644 --- a/app/models/hat.rb +++ b/app/models/hat.rb @@ -21,7 +21,7 @@ class Hat < ActiveRecord::Base def to_html_label hl = (self.link.present? && self.link.match(/^https?:\/\//)) - h =raw(t('.grantedby', :hat => "#{self.hat.gsub(/[^A-Za-z0-9]/, \"_\").downcase}", :inviteuser => "#{t('.inviteuser')}", "#{self.created_at.strftime("%Y-%m-%d")}")) + h = I18n.t 'models.hat.grantedby', :hat => "#{self.hat.gsub(/[^A-Za-z0-9]/, "_").downcase}", :inviteuser => "#{self.granted_by_user.username}", :invitedate => "#{self.created_at.strftime("%Y-%m-%d")}" if !hl && self.link.present? h << " - #{ERB::Util.html_escape(self.link)}"