Last Updated: February 25, 2016
·
4.337K
· chibicode

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.