所以我目前正在尝试从2.3 - > 3升级,并且遇到了问题。在rails 2.3中,我有一个由自动完成方法组成的模块。所以在按键上ajax请求会被发送到相应的消息。例如:Rails3模块帮助
/授权/ auto_complete_for_grant_name
module AutoComplete
def auto_complete_for_grant_name
name = params[:grant][:name].downcase
@grants = Grant.find(:all, :limit => 10, :conditions => "name like '%"+name+"%'")
render :partial => 'global/grants'
end
end
一旦我升级到Rails3中,这是坏了。我已经包括:
config.autoload_paths << "#{Rails.root}/lib"
在我的application.rb中
,并:
include AutoComplete
在我的应用程序控制器。
我在做什么错?谢谢!
编辑: (萤火虫输出):未能加载源:http://localhost:3000/grants/auto_complete_for_grant_name
任何错误信息? – 2010-11-23 19:56:21
你有任何错误信息? “这是打破”有点太模糊调试好。有关具体是什么被打破的更多信息将有很大帮助。 – jergason 2010-11-23 19:56:42
你得到的错误信息是什么? – markquezada 2010-11-23 19:58:19