ActiveRecord hating a particular column? (Bizarre)
I've been working on a web app lately, and Activerecord has started creeping me out- for the most part it's awesome, but it has taken to treating a particular column like a leper.
Initially I created a student model from a scaffold. The model holds various information like name, email, entry quarter, etc. And that all works beautifully. The problem I'm having is in how it's taken to treating a particular column- a string named type. Type is supposed to have a value like "B.S.", "M.S", "PhD", etc, however, neither creating a new object instance nor editing an old one are able to change the value from ''. Furthermore, if I go into the datab开发者_高级运维ase and manually change the value, Rails throws a fit and throws errors when I call Student.find.
Any ideas as to what I'm doing wrong?
'type' is a protected column in activerecord for the purpose of inheritance. Oops!
精彩评论