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
-
Bryan Larsen November 23rd, 2010 @ 12:45 AM
- State changed from new to open
- Milestone set to Hobo 1.0X
- Assigned user set to Bryan Larsen
- Milestone order changed from 197922 to 0
-
Bryan Larsen November 27th, 2010 @ 04:07 AM
(from [32a9c672aa0c64474d5c565ef3fe595d83191dbf]) [#870] don't put inheritance column in hidden-fields https://github.com/tablatom/hobo/commit/32a9c672aa0c64474d5c565ef3f...
-
Bryan Larsen November 27th, 2010 @ 04:07 AM
(from [eea0bae99f4891bb178cdb3ea207979040a6ee03]) [#870] don't put inheritance column in hidden-fields https://github.com/tablatom/hobo/commit/eea0bae99f4891bb178cdb3ea20...
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.
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
- 870 WARNING: Can't mass-assign these protected attributes: sti_type (from [32a9c672aa0c64474d5c565ef3fe595d83191dbf]) [#870] ...
- 870 WARNING: Can't mass-assign these protected attributes: sti_type (from [eea0bae99f4891bb178cdb3ea207979040a6ee03]) [#870] ...