Pedro Paiva
709d2c87e2
Add Rails 6.1 compatibility
...
Rails 6.1 needs the following changes:
- Add `owner: nil` to `define_method_attribute` calls
- Pass `options` to error `add` method as keyword argument
Ref:
- https://api.rubyonrails.org/v6.0.0/classes/ActiveModel/Errors.html#method-i-add
- https://api.rubyonrails.org/v6.1.0/classes/ActiveModel/Errors.html#method-i-add
Fix : #193
2021-01-10 10:28:52 +01:00
Adam Meehan
f8e6480f58
use ActiveSupport Array.wrap
2019-08-20 10:38:38 -10:00
Adam Meehan
e5bb096161
Move method generation to ActiveModel only and use type system in AR
...
The ActiveModel type system with extensions in ActiveRecord provide
us a lot of convenience. Some general attribute code is now moved to
ActiveModel only as the AR types provide raw value capturing
(before_type_cast) and type classes to handle type specific string
value parsing if enabled.
In my view, we need to go futher and strip out more from ActiveModel
extension but at least we should have compatibility at the moment.
2018-05-19 15:22:23 +10:00
Adam Meehan
8dc191a4cd
Update TextModel method_missing with current ActiveModel methods
2018-05-15 19:26:54 +10:00
Adam Meehan
7d006bd3bd
not a fix but stops stack recursion problem
2018-05-15 17:22:43 +10:00
Adam Meehan
0444bdc650
Datetime select extension fixes with help from @johncarney's fork
2015-12-29 15:49:18 +11:00
Adam Meehan
08b16f155c
Rspec 3 syntax
2015-12-29 14:55:03 +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
473da0fa5e
Fix DateTimeSelect extension for Rails 3.1.0
2011-09-18 18:37:01 +10: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