开发者

rails partial error - no route found

开发者 https://www.devze.com 2023-03-04 06:29 出处:网络
When I render this partial without AJAX it works fine but when I render it using AJAX call i get the following exception.

When I render this partial without AJAX it works fine but when I render it using AJAX call i get the following exception.

What am I doing wrong ?

ActionView::Template::Error (No route matches {:action=>"destroy", :followerid=>1,     :follower_type=>"topic", :controller=>"follows", :discussion_id=>91}):
2: <% discussion.followers.each do |topic| %>
3:     <% if topic.is_a? Topic%>
4:           <h3><%= render :partial => '/shared/topic_item', :locals => { :topic => topic }%></h3>
5:           <%= button_to("unTag", discussion_follow_path(discussion.id, :follower_type => "topic", :followerid => topic.id ), :method => :delete, :remote =>true) %>
6:     <%end%>
7: <%end%>

app/views/discussions/_edit_topics.html.erb:5:in _app_views_discussions__edit_topics_html_erb__847854145_2171200660_7386124' app/views/discussions/_edit_topics.html.erb:2:ineach' app/views/discussions/_edit_topics.html.erb:2:in _开发者_如何学Pythonapp_views_discussions__edit_topics_html_erb__847854145_2171200660_7386124' app/views/follows/create.js.erb:9:in_app_views_follows_create_js_erb__1164388053_2171521760_0'

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号