Module: ScheduleAttributes::ActiveRecord::Sugar
- Defined in:
- lib/schedule_attributes/active_record.rb
Instance Method Summary collapse
Instance Method Details
#has_schedule_attributes(options = {:column_name => :schedule}) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/schedule_attributes/active_record.rb', line 18 def has_schedule_attributes(={:column_name => :schedule}) [:column_name] ||= ScheduleAttributes::DEFAULT_ATTRIBUTE_KEY @schedule_field = [:column_name] @default_schedule = [:default_schedule] if .has_key?(:default_schedule) serialize @schedule_field, ScheduleAttributes::Serializer include ScheduleAttributes::ActiveRecord end |