Friday, 9 August 2013

Rails validation error: Account can not be blank

Rails validation error: Account can not be blank

I am receiving the following error when running my rake task:
Validation failed: Account can't be blank
This is the bit of code throwing the error:
test.entries.create!({
:account_id => account.id,
:date => date
})
My validation for both test and entries only validates the presence of
:account_id. I know the error message is humanized to remove the .id, but
it is obvious that :account_id exists. What am I missing here? I am using
rails 3.1.14.

No comments:

Post a Comment