Class: UserFact

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/user_fact.rb

Instance Method Summary collapse

Instance Method Details

#to_sObject


14
15
16
17
18
# File 'app/models/user_fact.rb', line 14

def to_s
  n  = user.try(:name) || _("Unknown user")
  fn = fact_name.try(:name) || _("Unknown fact")
  "#{n}:#{fn}:#{criteria.empty? ? "Empty" : criteria}:#{operator}:#{andor}"
end