So I have a field in 开发者_JAVA技巧the question table, called is_public..I migrated my database, restarted it and now when I get this error everytime I call is_public for a record in the question records.
undefined method `is_public' for #<Question:0x7e9aa780>
Any ideas to why this is happening ?
Not sure if this was the issue, but I had the same problem, and it looks like somehow my schema.rb
file was changed, removing that column.
I manually added it back, and the error went away.
Are you using attr_accessible?
If so, add :is_public
to the list.
精彩评论