2011-09-29 28 views
1

我使用回形針,而在數據庫中保存創建新對象我面臨 can't convert nil into Integer paperclip錯誤類型錯誤(不能轉換成零整數)回形針

這是我寫在我的功能。

def create 
    @asset = Asset.new(params[:snap]) #here i am facing the above error. 
    @asset.user_id = current_user.id 
    @asset.save 
    redirect_to "/" 
end 

這是張貼的同時形式

{:original=>#<File:/tmp/stream20110929-1212-17asdf-0,6708,0>, .... } 

解決這個任何建議什麼,我的故事嗎?

+0

沒有解決方案嗎? –

回答

相關問題