mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-23 06:16:44 +00:00
small cleanup and correction of docs
This commit is contained in:
parent
a54d562a69
commit
705e787775
@ -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.
|
||||
|
||||
@ -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 = {}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user