doc tweaks and minor stuff

This commit is contained in:
Adam Meehan 2008-07-01 11:34:49 +10:00
parent 67183eb69f
commit 6ffb7e5780
2 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,8 @@ module ValidatesTimeliness
time_array[0..2].join('-') + ' ' + time_array[3..5].join(':')
end
# Overrides AR method to store multiparameter time and dates
# Overrides AR method to store multiparameter time and dates as
# ISO datetime string for later validation
def execute_callstack_for_multiparameter_attributes(callstack)
errors = []
callstack.each do |name, values|
@ -20,7 +21,7 @@ module ValidatesTimeliness
else
klass.new(*values)
end
send(name + "=", value)
send("#{name}=", value)
rescue => ex
errors << AttributeAssignmentError.new("error on assignment #{values.inspect} to #{name}", ex, name)
end

View File

@ -2,6 +2,7 @@ require File.dirname(__FILE__) + '/spec_helper'
describe ValidatesTimeliness::AttributeMethods do
include ValidatesTimeliness::AttributeMethods
include ValidatesTimeliness::Validations
before do
@person = Person.new