Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 6521

Show
Ignore:
Timestamp:
04/13/07 19:48:33 (1 year ago)
Author:
rick
Message:

add #tz_time_attributes class method for ActiveRecord models to automatically change Times to TzTimes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/tztime/README

    r6100 r6521  
    3939 
    4040  class Task < ActiveRecord::Base 
    41     before_create :fix_timezone 
    42  
    43     private 
    44  
    45       def fix_timezone 
    46         self.alert_at = TzTime.at(self.alert_at) 
    47       end 
     41    tz_time_attributes :alert_at 
    4842  end 
    4943