1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
thoughtbot--shoulda-matchers/spec/unit/shoulda/matchers
Brian McManus 12e788f1d0 Numericality validation of virtual attributes
Commit #18b2859d2522a4866c398b9a32ebc3de4ec79389 broke numericality
validation of virtual attributes in ActiveRecord models. This commit
added a `column_type` method that assumes if `columns_hash` is a thing
then our attribute would be present within it. This is not true for
virtual attributes and leads to:
```
     NoMethodError:
           undefined method `type' for nil:NilClass
         # /Users/bdmac/.gem/ruby/2.2.2/gems/shoulda-matchers-3.0.1/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb:442:in
         # `column_type'
```
2016-01-07 12:12:16 -07:00
..
action_controller Fix formatting issues with #permit failure messages 2015-09-29 18:30:21 -06:00
active_model Numericality validation of virtual attributes 2016-01-07 12:12:16 -07:00
active_record Enable ignoring_interference_by_writer by default 2016-01-05 00:58:17 -07:00
doublespeak Improve architecture for permit matcher 2015-09-29 18:42:08 -06:00
independent Add with_prefix to delegate_method 2014-12-15 22:38:27 -07:00
routing Add a new Routing module 2015-09-25 17:45:33 -06:00
util word_wrap: Add ability to indent wrapped text 2015-12-13 20:22:21 -07:00
doublespeak_spec.rb Make Doublespeak specs runnable without Rails 2015-02-28 23:41:28 -07:00