【发布时间】:2012-03-29 13:06:29
【问题描述】:
我已将我的应用程序从 Rails 2.3.5 升级到 Rails 3.1.3。我有 acts_as_commentable_with_threading 和 awesome_nested_set 作为插件。现在我在 GemFile for Rails 3.1.3 中添加了如下
gem 'awesome_nested_set'
gem 'acts_as_commentable_with_threading'
我在模型中有如下代码
class Post < ActiveRecord::Base
acts_as_commentable
end
acts_as_commentable_with_threading 的迁移已在数据库中应用。
我在视图中有声明为
<%= pluralize(post.root_comments.size, "comment") %> on this post
当我尝试加载该视图时,该行出现错误
uninitialized constant Post::Comment
可能是什么问题。请帮帮我。
提前致谢!
【问题讨论】:
-
这个问题还没有解决办法吗?我刚开始收到此错误。
-
@jab 没有人。由于我放弃了该项目的工作,因此我没有进一步检查。
标签: ruby-on-rails-3 acts-as-commentable