Class: Relation
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Relation
- Defined in:
- app/models/relation.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.for_company ⇒ Object
15 16 17 |
# File 'app/models/relation.rb', line 15 def self.for_company where(:person_can_be_company => true) end |
.for_individual ⇒ Object
11 12 13 |
# File 'app/models/relation.rb', line 11 def self.for_individual where(:person_can_be_individual => true) end |
.for_type(type) ⇒ Object
19 20 21 |
# File 'app/models/relation.rb', line 19 def self.for_type(type) send("for_#{type.downcase}") end |
Instance Method Details
#indefinite_article ⇒ Object
23 24 25 |
# File 'app/models/relation.rb', line 23 def indefinite_article %w(a e i o u).include?(description[0].downcase) ? 'an' : 'a' end |