Pusher 聊天示例错误
我正在尝试使用 tarnfeld 的 PusharChat-Rails
我下载了该文件,做了通常的 捆绑安装
&数据库:迁移。
我更改了 PusherChat-Rails/app/views/layouts/application.html.erb 中的 api 密钥,
但收到此错误,
NoMethodError in Chat#view
Showing /Users/gkolan/work/PusherChat/app/views/chat/view.html.erb where line #22 raised:
undefined method `auto_link_urls' for #<#<Class:0x007fdddb772818>:0x007fdddb710230>
Extracted source (around line #22):
19: <ul id="messages">
20: <% @messages.each do |message| %>
21: <% user = ChatUser.find(message.user_id) %>
22: <li<% if user.id == @user.id %> class="you"<% end %>><strong><%= user.nickname %></strong> said:<br><%= auto_link_urls(message.message, { :target => "_blank" }) %></li>
23: <% end %>
24: </ul>
25: <div id="message-overlay"></div>
Rails.root: /Users/gkolan/work/PusherChat
我认为这是一个非常简单的错误。你能帮我解决这个问题吗?
提前致谢!
I am trying to work with tarnfeld's PusharChat-Rails
I downloaded the file, did the usual bundle install
& db:migrate
.
I changed the api key in PusherChat-Rails / app / views / layouts / application.html.erb
but I am getting this error
NoMethodError in Chat#view
Showing /Users/gkolan/work/PusherChat/app/views/chat/view.html.erb where line #22 raised:
undefined method `auto_link_urls' for #<#<Class:0x007fdddb772818>:0x007fdddb710230>
Extracted source (around line #22):
19: <ul id="messages">
20: <% @messages.each do |message| %>
21: <% user = ChatUser.find(message.user_id) %>
22: <li<% if user.id == @user.id %> class="you"<% end %>><strong><%= user.nickname %></strong> said:<br><%= auto_link_urls(message.message, { :target => "_blank" }) %></li>
23: <% end %>
24: </ul>
25: <div id="message-overlay"></div>
Rails.root: /Users/gkolan/work/PusherChat
I think its a very simple error. Could you please help me solve this?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 Rails >= 3.1.0,
auto_link_urls
方法已被弃用。您可以:
The
auto_link_urls
method has been deprecated for rails >= 3.1.0.You may :