Rails ActiveRecord update_attributes问题

den*_*icz 1 activerecord ruby-on-rails-3

我正在尝试为特定对象运行update_attributes,但每次我尝试运行我的脚本时,都会收到以下错误: TypeError (can't convert String into Integer):

这是我正在使用的代码

media = Media.find(params[:media_id])
media.update_attributes({:started_encode => false, :encode_success => false, :akamai => false})
Run Code Online (Sandbox Code Playgroud)

知道为什么会一直抛出这个错误吗?

gai*_*zka 7

哪些是媒体列表的名称?

您可能已经发现此问题:

http://ethernetflow.blogspot.com/2010/11/rails-typeerror-cant-convert-string.html

基本上,你的表中不能有一个名为"HASH"的列.