我安装了Redcarpet . 我正在关注如何使用它的272 Railscast教程 . 我在 show.html.erb 中有这一行
show.html.erb
<%= Redcarpet.new(@topic.text).to_html %>
我的rails应用程序没有't seem to know there'的Redcarpet . 我给了 NoMethodError :
NoMethodError
undefined method `new' for Redcarpet:Module
我该如何解决这个问题?
请尝试以下方法:
<%= Markdown.new(@topic.text).to_html %>
您可能想查看definition of that method .
1 回答
请尝试以下方法:
您可能想查看definition of that method .