ActiveModel::MissingAttributeError: can't write unknown attribute `true`
On Rails, if you ever come across this error (notice the attribute name is true
)
ActiveModel::MissingAttributeError:
can't write unknown attribute `true`
It's likely because you're doing something like this:
belongs_to :..., touch: :true
Instead of this:
belongs_to :..., touch: true
Don't use the symbol :true
.
Written by Shu Uesugi
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Related Tags
#rails
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#