Commit Graph

171 Commits

Author SHA1 Message Date
Adam Meehan
acd10f7b64 v3.0.8 2011-12-24 17:50:22 +11:00
Carlos Antonio da Silva
7a784a6c54 Remove InstanceMethods module when using AS::Concern, as it was deprecated in 3.2 2011-12-20 20:52:33 -02:00
Adam Meehan
907fd3e439 Fix for Mongoid shim for reload which was nicely moved into a module to allow super 2011-12-10 17:46:35 +11:00
Adam Meehan
e44e9d2f11 v3.0.7 2011-09-21 21:41:01 +10:00
Adam Meehan
86b7bc4829 Fix before_type_cast for non-dirty attributes (issue #52).
Only use before_type_cast implementation if earlier than 3.1.0 which has
it's own working version for date/time fields now.
2011-09-21 21:28:53 +10:00
Adam Meehan
11ae94cba6 Cleanup DateTimeSelect extension specs 2011-09-18 18:53:38 +10:00
Adam Meehan
473da0fa5e Fix DateTimeSelect extension for Rails 3.1.0 2011-09-18 18:37:01 +10:00
Adam Meehan
e7b503ae4f Fix DateTimeSelect extension to use integers from param values.
Change extension spec to use string params.
2011-09-18 18:34:23 +10:00
Adam Meehan
9a99c47323 Can use simple Mongoid inclusion now that fixed Concern usage is released (a while ago) 2011-09-18 18:33:29 +10:00
Thilo Rusche
ac90ab96cd fixed integer vs string expectation 2011-05-13 17:47:59 +01:00
Thilo Rusche
b4c1a39343 added support for :discard_day in form helpers 2011-05-13 17:13:11 +01:00
Adam Meehan
7886132114 version 3.0.5 2011-05-09 17:34:09 +10:00
Adam Meehan
ac98978441 Better timeliness_type_cast_code 2011-05-09 07:43:41 +10:00
Adam Meehan
ea7c9ec7be Type caste to Date for date columns in AR after parsing string in attribute writer 2011-04-27 07:37:26 +10:00
Adam Meehan
e3dea5aebd use activemodel scoped class name in helper method to remove need for .kind override 2011-02-24 21:12:49 +11:00
Adam Meehan
2822e368e3 Exit restriction validation on first restriction error 2011-02-24 07:58:48 +11:00
Adam Meehan
dac62060df version 3.0.5 2011-01-29 17:42:42 +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
bbb752e4e3 version 3.0.4 2011-01-22 11:16:10 +11:00
Adam Meehan
54ba4a038c use namespaced validator class name for the :timeliness option 2011-01-22 10:48:40 +11:00
Adam Meehan
7b5b11ad63 use class_attribute again, now that I know how to use it safely 2011-01-22 10:47:22 +11:00
Edgars Beigarts
d14ae09820 Fixed :between option. 2011-01-21 11:02:59 +02:00
Adam Meehan
01d1dc7c5e version 3.0.3 2010-12-11 09:17:31 +11:00
Adam Meehan
b09f937688 tiny consistency change 2010-12-11 09:17:08 +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
46eafe31a1 version 3.0.2 2010-12-04 16:40:13 +11:00
Adam Meehan
3bf364a395 reluctantly overriding whole execute_callstack_for_multiparameter_attributes method
this fixes issue for Date column types. Damn method is just too
unwieldly and should be refactored in Rails.
2010-12-04 16:29:05 +11:00
Adam Meehan
bfcab52c22 can use super for some InstanceTag methods
cleans up for DateTimeSelect extension a little
2010-11-02 10:13:13 +11:00
Adam Meehan
20c0aaa793 version 3.0.1 2010-11-02 09:53:25 +11:00
José Valim
889b5a9b07 Move timeliness defined methods to a module so they can be overwritten. 2010-11-01 14:56:03 -02:00
Adam Meehan
2404fb1489 version 3.0.0 final 2010-10-18 11:54:03 +11:00
Adam Meehan
4f421d87fc add remove_use_formats alias to Timeliness and spec config spec 2010-10-18 11:15:50 +11:00
Adam Meehan
ecf183d0f1 fix stupid mistake with Timeliness config delegation 2010-10-15 12:32:39 +11:00
Adam Meehan
208bfc5af6 version 3.0.0.beta.5 2010-10-14 19:14:10 +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
b152dff626 couple of AS dependencies required 2010-10-11 15:53:16 +11:00
Adam Meehan
71162d5614 parser should be a module not a class 2010-10-11 15:49:01 +11:00
Adam Meehan
3f72f31063 change shorthand values to current timezone (thanks rpbertp13) 2010-10-11 13:12:16 +11:00
Adam Meehan
6301d87829 fix uncommented setting in config template 2010-10-11 12:46:53 +11:00
Adam Meehan
2756d21abd added railtie and moved in some config defaults for Rails and AR 2010-10-09 16:44:19 +11:00
Adam Meehan
3f92cac8b0 forgot to add default_timezone to generator 2010-10-09 16:05:39 +11:00
Adam Meehan
247e157708 readme and generator comments 2010-10-08 08:40:22 +11:00
Adam Meehan
d450ab7c06 parser comments 2010-10-01 09:51:57 +10:00
Adam Meehan
f67519f091 don't to_i format values when nil in parser 2010-10-01 09:38:07 +10:00
Adam Meehan
3abb95bc38 parser comments update and typos 2010-10-01 09:08:24 +10:00
Adam Meehan
8a0b2418bb simplify format arguments in parser 2010-10-01 09:07:59 +10:00
Adam Meehan
f2f1e0b165 tiny tweaks 2010-09-30 19:08:09 +10:00
Adam Meehan
bd1b2f0b96 refactor error messages and fix custom invalide type message 2010-09-30 18:28:39 +10:00
Adam Meehan
2be057b057 version 3.0.0.beta.4 2010-09-29 08:29:02 +10:00
Adam Meehan
1ff215bf55 readme and comment changes 2010-09-29 08:14:17 +10:00
Adam Meehan
6e67d45274 Validation support for ActiveModel::Validations without a shim
move validation helpers into ActiveModel::Validations for default base support
add check if attribute methods shim is being used
refactor specs for helper and attribute methods separation
more mongoid workarounds due to incorrect use of AS::Concern
2010-09-29 08:09:43 +10:00
Adam Meehan
5f31f40413 add parser config to initializer 2010-09-27 16:54:21 +10:00
Adam Meehan
ea082b5258 use I18n default value when missing value for error value format 2010-09-27 16:53:54 +10:00
Adam Meehan
cd62163152 remove redundant dummy date setting from Parser 2010-09-27 14:58:17 +10:00
Adam Meehan
99ba103181 fix reload return value for AR 2010-09-24 14:51:05 +10:00
Adam Meehan
ff555eb293 refactored raw value cache to be more explicit 2010-09-24 14:19:25 +10:00
Adam Meehan
7f297d576a fix plugin parser timezone spec in AR 2010-09-24 13:45:55 +10:00
Adam Meehan
f41903a769 refactored to get attribute type from model types not validation type
reverts to behaviour of old version which allows you to define validations
of any type for sake of the values it is validating against
2010-09-24 12:00:15 +10:00
Adam Meehan
00f01402e0 reload to clear cached value. Fixes mongoid. 2010-09-23 21:34:01 +10:00
Adam Meehan
d5b0fe0526 list mongoid in config comments 2010-09-23 08:14:11 +10:00
Adam Meehan
8edf55ef46 version 3.0.0.beta.3 2010-09-22 07:26:43 +10:00
Adam Meehan
b7fd7c1d60 add mongoid comment 2010-09-22 07:09:43 +10:00
Adam Meehan
90f0c45778 preliminary Mongoid support 2010-09-22 07:07:36 +10:00
Adam Meehan
0df3886804 fix validator for :format option 2010-09-21 20:15:26 +10:00
Adam Meehan
48b42da85e seperate attribute method specs into orm specific file
move ORM shims to orm folder
2010-09-21 20:12:40 +10:00
Adam Meehan
bf57efaaa6 include timezone awareness option for attribute parsing 2010-09-21 18:27:12 +10:00
Adam Meehan
c8ad4cd525 use inheritable hash again as class_attribute doesn't clone hash for subclass 2010-09-21 18:26:30 +10:00
Adam Meehan
8d3ae75b19 add use_plugin_parser option to initializer template 2010-09-21 18:25:30 +10:00
Adam Meehan
c804442330 dusting 2010-09-21 10:23:13 +10:00
Adam Meehan
b2d81f0dcf use class_attribute to avoid inheritable accessor issues 2010-09-21 10:21:34 +10:00
Adam Meehan
92d6fd8725 version 3.0.0.beta.2 2010-09-21 08:42:43 +10:00
Adam Meehan
f0e9d0292a clean up valdiation methods 2010-09-21 08:37:54 +10:00
Adam Meehan
27e01486e9 actually use the plugin parser in the write method (yikes) 2010-09-21 08:36:11 +10:00
Adam Meehan
0f84584238 v3.0.0.beta 2010-09-17 15:16:03 +10:00
Adam Meehan
4fa8dfac72 don't allow 0 or > 12 for meridian am hour 2010-09-17 14:36:21 +10: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
b2d1dcdd3f add some common formats 2010-09-17 13:43:47 +10:00
Adam Meehan
1fb89d6455 simplify tokens to hash and generate in reverse order of token length 2010-09-17 13:42:21 +10:00
Adam Meehan
423d60f885 use inheritable hash for valdiated attributes 2010-09-17 10:56:13 +10:00
Adam Meehan
b23dba5202 remove time_with_zone require 2010-09-17 08:52:55 +10:00
Adam Meehan
58fdb7682b removed some unused stuff 2010-09-17 08:33:59 +10:00
Adam Meehan
3f0e430eab refactored parsing and conversion with timezones. removed some cruft 2010-09-17 08:32:56 +10:00
Adam Meehan
ab8d680383 fix multiparam extension 2010-09-16 22:39: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
9ddd150b2f change ORM attribute generation and extension mechanism
now using shim since the attribute matcher is not required for AM
2010-09-16 22:33:22 +10:00
Adam Meehan
10f49144c3 extend AR by default if present 2010-08-31 22:43:40 +10:00
Adam Meehan
53f3d876ea shorthand defaults in generator coments 2010-08-31 16:47:41 +10:00
Adam Meehan
b0ebd5bfda rename instance var 2010-08-31 13:28:05 +10:00
Adam Meehan
2f3efa2107 custom error message options 2010-08-31 13:23:07 +10:00
Adam Meehan
c97050f62f autoload version file 2010-08-31 12:46:08 +10:00
Adam Meehan
e3928e78eb fixe for attribute write and raw value methods
add new generalised method to get raw value without dependence on
before_type_cast which may not be supported in ORMs

call super to define full ORM write method default
2010-08-11 13:45:06 +10:00
Adam Meehan
30fb0e5192 before_type_cast fix for ORMs not using it wont create 2010-08-10 15:41:53 +10:00
Adam Meehan
9347eadce8 word 2010-08-10 14:45:07 +10:00
Adam Meehan
c47dde6325 shorthand update in generator 2010-08-07 19:14:49 +10:00
Adam Meehan
82ede60985 restriction shorthand symbols 2010-08-07 19:08:35 +10:00
Adam Meehan
924c6766c1 renamed to enable_multiparameter_extension! 2010-08-03 23:27:46 +10:00