Commit 39ea5c37 authored by Carl Chenet's avatar Carl Chenet

fix granted hat bubble

parent 74cd3c48
......@@ -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)}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment