I'm getting the "WARNING: Can't m开发者_如何学编程ass-assign protected attributes: type", but I don't have any calls to attr_accessible
or attr_protected
in my code.
Is there anything else that might cause an attribute to become protected?
I'm not so keen on adding all attributes to an attr_accessible
statement, because that becomes just one more thing to maintain.
The type
attribute is reserved for internal use for single table inheritance.
You should be able to use type
by setting the set_inheritance_column
set_inheritance_column :kind # change to something other than :type.
Check out: Rails attr_accessible does not work for :type?
:type
is your problem.
精彩评论