From 705e78777595a9f591751967bb22603a0598aea1 Mon Sep 17 00:00:00 2001 From: Adam Meehan Date: Sun, 23 Nov 2008 17:42:34 +1100 Subject: [PATCH] small cleanup and correction of docs --- lib/validates_timeliness/attribute_methods.rb | 10 +++------- lib/validates_timeliness/formats.rb | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/validates_timeliness/attribute_methods.rb b/lib/validates_timeliness/attribute_methods.rb index becbe2f..dc92b8a 100644 --- a/lib/validates_timeliness/attribute_methods.rb +++ b/lib/validates_timeliness/attribute_methods.rb @@ -1,7 +1,7 @@ module ValidatesTimeliness - # The crux of the plugin is being able to store raw user entered values, - # while not interferring with the Rails 2.1 automatic timezone handling. This + # The crux of the plugin is being able to store raw user entered values + # while not interfering with the Rails 2.1 automatic timezone handling. This # requires us to distinguish a user entered value from a value read from the # database. Both maybe in string form, but only the database value should be # interpreted as being in the default timezone which is normally UTC. The user @@ -18,10 +18,6 @@ module ValidatesTimeliness # The wholesale replacement of the Rails time type casting is not done to # preserve the quickest conversion for timestamp columns and also any value # which is never changed during the life of the record object. - # - # Dates are also handled but only write to cache value converted by plugin - # parser. Default read method will retrieve from cache or do default - # conversion module AttributeMethods def self.included(base) @@ -64,7 +60,7 @@ module ValidatesTimeliness # Writes attribute value by storing raw value in attributes hash, # then convert it with parser and cache it. # - # If Rails 2.1 dirty attributes is enabled then the value is added to + # If Rails dirty attributes is enabled then the value is added to # changed attributes if changed. Can't use the default dirty checking # implementation as it chains the write_attribute method which deletes # the attribute from the cache. diff --git a/lib/validates_timeliness/formats.rb b/lib/validates_timeliness/formats.rb index 457f084..3a89c75 100644 --- a/lib/validates_timeliness/formats.rb +++ b/lib/validates_timeliness/formats.rb @@ -189,7 +189,7 @@ module ValidatesTimeliness # Adds new formats. Must specify format type and can specify a :before # option to nominate which format the new formats should be inserted in # front on to take higher precedence. - # Error is raise if format already exists or if :before format is not found. + # Error is raised if format already exists or if :before format is not found. def add_formats(type, *add_formats) formats = self.send("#{type}_formats") options = {}