#870 open
Bryan Larsen

WARNING: Can't mass-assign these protected attributes: sti_type

Reported by Bryan Larsen | November 23rd, 2010 @ 12:43 AM | in Hobo 1.0X

I get this error when trying to create an STI model using the default form.

hidden-fields includes the inheritance-column, which is unnecessary because TableName.new will set the inheritance column automatically.

hidden-fields excludes the 'type' column, which is a common name for the STI inheritance column, but I don't like using that name since its a reserved word. It also excludes all attr_protected columns. You'd think that the attr_protected list would include the inheritance column, but it's actually in attributes_protected_by_default instead. (attributes_protected_by_default also includes the id column).

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Attachments

Referenced by

Pages