开发者

undefined method 'binary_input' error with formtastic

开发者 https://www.devze.com 2023-02-16 01:31 出处:网络
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 fo

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

0

精彩评论

暂无评论...
验证码 换一张
取 消