I switched to SQL Server on production, and realized that Active Admin PUT calls aren't updating some boolean values in my database. The PUT calls will return a 302, and not update the record even though I can see that the parameter is being sent in exactly as expected. For example if a boolean was set to false, and I wanted to set it as true, Active Admin would correctly send the values in as value => true, but it will not update.
One thing I noticed that is funny, is that on heroku where we run our tests, the values for these fields will update just fine in Active Admin. On production, where SQL Server is used, the values show as 1 and 0, not as true or false. I have a feeling this is part of the issues.
My question is, why would only some of the booleans show up as 1 and 0 on SQL SERVER, and on heroku and mySQL show up as true or false? How can I fix these values to make the show true and false, rather than 1 and 0?
More information. Updating these values via rails console, and in the application, work just fine. I can say model.field = true then model.save in all environments successfully.
I was having exactly the same issue at heroku. For me, i had to restart my app after running migrations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With