fixed bug with double :id in path

This commit is contained in:
jomo
2014-02-01 19:48:40 +01:00
parent 8b7e573b73
commit b3beb8ef13
2 changed files with 7 additions and 11 deletions
+3 -5
View File
@@ -1,12 +1,10 @@
<%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= link_to @forum %> <%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= link_to @forum %>
<h1><%= @forum.name %></h1> <h1><%= @forum.name %></h1>
<%= link_to "New thread", new_forumthread_path, class: "btn blue" %> <%= link_to "New thread", new_forum_forumthread_path(@forum), class: "btn blue" %>
<div id="forum_threads"> <div id="forum_threads">
<% @threads.each do |thread| %> <% @threads.each do |thread| %>
<div class="group" id="thread-<%= thread.id %>"> <div class="forum_thread" id="thread-<%= thread.id %>">
<div class="header"> <%= link_to thread.title, forum_forumthread_path(@forum, thread) %>
<%= link_to thread.title, forumthread_path(thread) %>
</div>
</div> </div>
<% end %> <% end %>
</div> </div>
+1 -3
View File
@@ -24,12 +24,10 @@ Site::Application.routes.draw do
end end
resources :forums, path: 'forums' do resources :forums, path: 'forums' do
resources :forumthreads, path: 'threads'
collection do collection do
resources :forumgroups, path: 'groups' resources :forumgroups, path: 'groups'
end end
member do
resources :forumthreads, path: 'threads'
end
end end
match '/status' => 'status#show' match '/status' => 'status#show'