Class: Rbfam::Family
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Rbfam::Family
- Defined in:
- lib/rbfam/family.rb
Class Method Summary collapse
Class Method Details
.named(string) ⇒ Object
13 14 15 |
# File 'lib/rbfam/family.rb', line 13 def self.named(string) where(arel_table[:description].matches("%#{string}%")) end |
.rf(id) ⇒ Object
8 9 10 11 |
# File 'lib/rbfam/family.rb', line 8 def self.rf(id) int_id = id.to_i find_by_name("RF%s%d" % [?0 * (5 - Math.log10(int_id).ceil), int_id]) end |