Module: Bhf::ActiveRecord::Object
- Defined in:
- lib/bhf/active_record.rb
Instance Method Summary collapse
Instance Method Details
#to_bhf_s ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/bhf/active_record.rb', line 5 def to_bhf_s return title if self.respond_to? :title return name if self.respond_to? :name if self.respond_to? :attributes return title if attributes['title'] return name if attributes['name'] return "#{self.class.to_s.humanize} ID: #{send(self.class.primary_key)}" if attributes[self.class.primary_key] end self.to_s.humanize end |