I just made a change to my database, adding a 'description' with a data type of blob.
I've added the :description to my attr_accessible in my model, and added :descriptio开发者_运维技巧n to my form, so it looks like
<%= form.inputs :title, :image, :description %>
When I run the form, I get
undefined method `binary_input' for #<Formtastic::SemanticFormBuilder:0x5876568>
I have absolutely no idea where to even start debugging this. If I remove :description from the form, everything is fine. I see in my database that the field was added no problem and has a type of blob.
Any suggestions on how to fix this??
I'm using Ruby 1.92 on rails 3. ----------------------------------UPDATE-------------------------------------------
I was suspicious that the BLOB type was the cause of this problem, so I altered the column type to string, and now it works. Unfortunately, I'm expecting the descriptions to be longer than the string field in the database allows.
Anybody else have issues using blob?? I have another blob field in my db which works without issue.
Thanks
精彩评论