I have a photos model and added a drop-down list to the form, when the
option is selected, the correct parameters are passed but it is not
saved to the database.
I've googled this and looked at the api but I'm not sure what I'm doing.
In my photo model type is a string.
Is string the wrong field type? or anything else wrong?
I have a photos model and added a drop-down list to the form, when the
option is selected, the correct parameters are passed but it is not
saved to the database.
I've googled this and looked at the api but I'm not sure what I'm doing.
In my photo model type is a string.
Is string the wrong field type? or anything else wrong?
If an attribute is named type Active Record will try and use it for
single table inheritance.
I have a photos model and added a drop-down list to the form, when the
option is selected, the correct parameters are passed but it is not
saved to the database.
I've googled this and looked at the api but I'm not sure what I'm doing.
In my photo model type is a string.
Is string the wrong field type? or anything else wrong?
You've omitted the essential information to diagnose the problem.
What's the form action? Are your routes correct? What shows in the log
as being posted in params? Are there any error messages?
I have a photos model and added a drop-down list to the form, when the
option is selected, the correct parameters are passed but it is not
saved to the database.
I've googled this and looked at the api but I'm not sure what I'm doing.
In my photo model type is a string.
Is string the wrong field type? or anything else wrong?
Oh, disregard my earlier post. I just realized what's going on. Rails
reserves the field name "type" for STI purposes, and gets confused if
you try to use that name for an ordinary field.
I have a photos model and added a drop-down list to the form, when the
option is selected, the correct parameters are passed but it is not
saved to the database.
I've googled this and looked at the api but I'm not sure what I'm doing.
In my photo model type is a string.
Is string the wrong field type? or anything else wrong?
Oh, disregard my earlier post. I just realized what's going on. Rails
reserves the field name "type" for STI purposes, and gets confused if
you try to use that name for an ordinary field.
I recently encountered this same problem. I simply changed the column to
'category' and solved the problem. Though, it took far too long for me
to realise this.