Chris Griego
64a7440de4
Fix multiparameter extension to work with ActiveRecord 3.1
2012-02-02 08:54:39 +11:00
Chris Griego
2702ec3266
The ActiveRecord extension now returns the original return value for .define_attribute_methods
...
This helps other extensions, like PermalinkFu, which depend on the return value
2012-02-02 08:44:22 +11:00
Adam Meehan
4acd0180f9
Add specs for allow_nil and allow_blank with attribute value cache active
2012-02-01 21:25:42 +11:00
Adam Meehan
3f4615e053
scope a spec to AR version
2012-02-01 21:25:05 +11:00
Adam Meehan
5be45b00db
Hook into undefine_attributes_methods to remove timeliness methods as well
2012-02-01 20:38:05 +11:00
Adam Meehan
f8aeeca0a9
A fix for ActiveRecord 3.1.x and plugin parser not working together (issue #52 )
2012-01-26 22:44:01 +11: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
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
af9d6cdba4
Fix brokena and brittle tests
2011-09-18 18:33:30 +10:00
Adam Meehan
969edfcb83
Helper method spec
2011-09-18 18:33:29 +10:00
Adam Meehan
1faf0efa4b
Spec helper validate method setup in test models not needed
2011-09-18 18:33:29 +10:00
Thilo Rusche
b4c1a39343
added support for :discard_day in form helpers
2011-05-13 17:13:11 +01: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
1c70af4dba
simplify data select spec
2011-02-23 20:05:09 +11:00
Adam Meehan
38457ec334
change spec config setup to use class method with_config
2011-01-29 16:33:37 +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
983e80f239
move some files into spec/support and include ModelHelpers in config
2011-01-28 19:36:02 +11:00
Adam Meehan
54ba4a038c
use namespaced validator class name for the :timeliness option
2011-01-22 10:48:40 +11:00
Edgars Beigarts
d14ae09820
Fixed :between option.
2011-01-21 11:02:59 +02: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
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
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
4f421d87fc
add remove_use_formats alias to Timeliness and spec config spec
2010-10-18 11:15:50 +11:00
Adam Meehan
2c6df945ec
remove old parser and use timeliness gem
2010-10-14 18:57:53 +11:00
Adam Meehan
1bf068392e
avoid ruby 1.9.2 warning in spec
2010-10-14 07:58:23 +11:00
Adam Meehan
316086e76f
ruby 1.9.2 spec fixes for instance method checks
2010-10-14 07:55:35 +11:00
Adam Meehan
99704211a1
don't run mongoid spec if not loaded
2010-10-09 16:46:02 +11:00
Adam Meehan
f67519f091
don't to_i format values when nil in parser
2010-10-01 09:38:07 +10:00
Adam Meehan
bd1b2f0b96
refactor error messages and fix custom invalide type message
2010-09-30 18:28:39 +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
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
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
2efcff2fd4
spec cleaning
2010-09-23 21:34:32 +10:00
Adam Meehan
00f01402e0
reload to clear cached value. Fixes mongoid.
2010-09-23 21:34:01 +10:00
Adam Meehan
6220ae7b43
add validation method check to each ORM
2010-09-23 08:13:37 +10:00
Adam Meehan
90f0c45778
preliminary Mongoid support
2010-09-22 07:07:36 +10:00
Adam Meehan
1289988bed
remove spec for evaludate_option_value zone change on model method
2010-09-21 20:15:46 +10:00
Adam Meehan
0df3886804
fix validator for :format option
2010-09-21 20:15:26 +10:00
Adam Meehan
29057c41f7
use Person for non-ORM specific specs
2010-09-21 20:14:51 +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
896427a8d5
rspec updates
2010-09-21 10:22:48 +10:00
Adam Meehan
27e01486e9
actually use the plugin parser in the write method (yikes)
2010-09-21 08:36:11 +10:00