Raise a useful message when passing validate: false and a value doesn't have a corresponding column #61

Merged
merged 1 commit into from Aug 20, 2012

2 participants

@benpickles

This results in a more friendly and useful error message than:

NoMethodError: undefined method `type_cast' for nil:NilClass

And is specific to the case where validate: false is passed as ActiveRecord would otherwise raise the error:

NoMethodError: undefined method `foo=' for #<Topic:0x007fd26e5238c8>
@zdennis zdennis merged commit 2bb1150 into zdennis:master Aug 20, 2012
@zdennis
Owner

Thanks @benpickles !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment