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.
11 12 13 |
# File 'app/models/refinery/race_registrations/person.rb', line 11 def bypass_humanizer @bypass_humanizer end |
#registration_ids ⇒ Object
Returns the value of attribute registration_ids.
11 12 13 |
# File 'app/models/refinery/race_registrations/person.rb', line 11 def registration_ids @registration_ids end |
Class Method Details
.search(search, sort, person) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'app/models/refinery/race_registrations/person.rb', line 36 def self.search(search, sort, person) registration_ids = nil if person.present? && person[:registration_ids].present? registration_ids = person[:registration_ids].select{|reg_id| reg_id.to_i > 0 } end 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 search_by_registration_ids(registration_ids) end end |