0
我刚刚更新了Rails 3.0.10到3.1,一切似乎都没问题。回形针和导轨3.1 NoMethodError和零对象
但回形针不工作了,给我一个错误:
你有一个零对象时,你没想到吧!
您可能已经预期了Array的一个实例。在评估零发生
错误[] =
我无法找到问题..感谢帮助
[编辑后评论]
型号:
class Community < ActiveRecord::Base
has_attached_file :commicon, :styles => { :thumb => "80x80>", :medium => "34x34!", :small => "20x20>", :rectangle => "80x40!", :mediumrect => "34x17>" , :smallrect => "20x10>"}
控制器:
class CommunitiesController < ApplicationController
def show
@community = Community.find(params[:id])
查看:
<%= image_tag @community.commicon.url(:thumb) %>
我觉得没有什么特别之处?
也许你应该发布你的代码,它更清晰。 – 2012-02-03 17:21:39