Class: Refinery::RaceRegistrations::Person
- Inherits:
-
Core::BaseModel
- Object
- Core::BaseModel
- Refinery::RaceRegistrations::Person
- Includes:
- Humanizer
- Defined in:
- app/models/refinery/race_registrations/person.rb
Instance Attribute Summary collapse
-
#bypass_humanizer ⇒ Object
Returns the value of attribute bypass_humanizer.
-
#registration_ids ⇒ Object
Returns the value of attribute registration_ids.
Class Method Summary collapse
Instance Attribute Details
#bypass_humanizer ⇒ Object
Returns the value of attribute bypass_humanizer.
12 13 14 |
# File 'app/models/refinery/race_registrations/person.rb', line 12 def bypass_humanizer @bypass_humanizer end |
#registration_ids ⇒ Object
Returns the value of attribute registration_ids.
12 13 14 |
# File 'app/models/refinery/race_registrations/person.rb', line 12 def registration_ids @registration_ids end |
Class Method Details
.search(search, sort, person) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'app/models/refinery/race_registrations/person.rb', line 37 def self.search(search, sort, person) registration_ids = person[:registration_ids].select{|reg_id| reg_id.to_i > 0 } if person.present? if search if sort != "" search_by_sort_and_registration_ids(search,sort,registration_ids) else search_by_sort_and_registration_ids(search,"surname",registration_ids) end else scoped end end |