Class: Refinery::RaceRegistrations::Registration
- Inherits:
-
Core::BaseModel
- Object
- Core::BaseModel
- Refinery::RaceRegistrations::Registration
- Defined in:
- app/models/refinery/race_registrations/registration.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.to_csv(options = {}) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/models/refinery/race_registrations/registration.rb', line 12 def self.to_csv( = {}) CSV.generate() do |csv| csv << column_names all.each do |product| csv << product.attributes.values_at(*column_names) end end end |
Instance Method Details
#to_param ⇒ Object
35 36 37 |
# File 'app/models/refinery/race_registrations/registration.rb', line 35 def to_param "#{id}-#{title.parameterize}" end |