Class: Chouette::ActiveRecord
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Chouette::ActiveRecord
- Defined in:
- app/models/chouette/active_record.rb
Direct Known Subclasses
Footnote, PtLink, TimeTableDate, TimeTablePeriod, TridentActiveRecord, VehicleJourneyAtStop
Class Method Summary collapse
-
.nullable_attributes ⇒ Object
to be overrided to set nullable attrs when empty.
Instance Method Summary collapse
Class Method Details
.nullable_attributes ⇒ Object
to be overrided to set nullable attrs when empty
11 12 13 |
# File 'app/models/chouette/active_record.rb', line 11 def self.nullable_attributes [] end |
Instance Method Details
#human_attribute_name(*args) ⇒ Object
20 21 22 |
# File 'app/models/chouette/active_record.rb', line 20 def human_attribute_name(*args) self.class.human_attribute_name(*args) end |
#nil_if_blank ⇒ Object
15 16 17 |
# File 'app/models/chouette/active_record.rb', line 15 def nil_if_blank self.class.nullable_attributes.each { |attr| self[attr] = nil if self[attr].blank? } end |