Commit Graph

15 Commits

Author SHA1 Message Date
Adam Meehan
4e5f5fa695 Return value if not of known type in type cast 2016-01-06 22:20:24 +11:00
Adam Meehan
3793ef2ed4 fix for validation nil value with :format option plugin parser disabled (issue 34) 2011-01-29 16:07:56 +11:00
Adam Meehan
509336e080 Fix type_cast_value for values which don't respond to to_time or to_date (renatoelias) 2010-12-11 09:13:35 +11:00
Adam Meehan
2c6df945ec remove old parser and use timeliness gem 2010-10-14 18:57:53 +11:00
Adam Meehan
1e48173e6a don't call to_time on Time object.
Fixes Ruby 1.9 bug which changes the zone to local when calling to_time
on a Time object! Lame! I mean seriously, Rails created the method and
then Ruby copies it into core and changes the behaviour. Why?
2010-10-14 07:40:30 +11:00
Adam Meehan
fa2736feb3 fix some timezone handling and add specs 2010-09-17 14:07:34 +10:00
Adam Meehan
b668a6f22e simplify dummy_time Time value creation 2010-09-17 13:46:03 +10:00
Adam Meehan
716f9e4f2e format option added back 2010-09-17 13:45:56 +10:00
Adam Meehan
8aa26a7898 ignore_usec option added back 2010-09-17 13:45:31 +10:00
Adam Meehan
3f0e430eab refactored parsing and conversion with timezones. removed some cruft 2010-09-17 08:32:56 +10:00
Adam Meehan
5d495505d9 proper timezone awareness and plugin parser hooks
Parser uses method compilation technique namely to a method not a proc
2010-09-16 22:35:38 +10:00
Adam Meehan
82ede60985 restriction shorthand symbols 2010-08-07 19:08:35 +10:00
Adam Meehan
40e404681e type cast value before blank check for invalid values 2010-08-03 15:04:59 +10:00
Adam Meehan
12b59739ad evaluate_option_value specs 2010-08-01 20:54:11 +10:00
Adam Meehan
fdc3086976 initial Rails 3 rewrite commit
completely rewritten for ActiveModel compatibility
uses ActiveModel EachValidator class as validator base class
simplifies :between by splitting into a :on_or_before and an :on_of_after
only :is_at option tested
2010-08-01 18:35:18 +10:00