mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
12e788f1d0
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' ``` |
||
---|---|---|
.. | ||
allow_mass_assignment_of_matcher_spec.rb | ||
allow_value_matcher_spec.rb | ||
disallow_value_matcher_spec.rb | ||
have_secure_password_matcher_spec.rb | ||
helpers_spec.rb | ||
validate_absence_of_matcher_spec.rb | ||
validate_acceptance_of_matcher_spec.rb | ||
validate_confirmation_of_matcher_spec.rb | ||
validate_exclusion_of_matcher_spec.rb | ||
validate_inclusion_of_matcher_spec.rb | ||
validate_length_of_matcher_spec.rb | ||
validate_numericality_of_matcher_spec.rb | ||
validate_presence_of_matcher_spec.rb |