1.If you want to create a text attribute column in mysql use in ruby:
Don't write :default => "", As some version of mysql will get error
Right way is: t.text :content, :null => false, #but not :default => ""
2.The better don't use type column name.
Because if you have a column named type, the ruby will find the object of the type. But you don't use object type for this model. So there will be a wrong.
Don't write :default => "", As some version of mysql will get error
Right way is: t.text :content, :null => false, #but not :default => ""
2.The better don't use type column name.
Because if you have a column named type, the ruby will find the object of the type. But you don't use object type for this model. So there will be a wrong.