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:in
each'
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'
精彩评论