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

View File

@@ -1,12 +1,10 @@
<%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= link_to @forum %>
<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">
<% @threads.each do |thread| %>
<div class="group" id="thread-<%= thread.id %>">
<div class="header">
<%= link_to thread.title, forumthread_path(thread) %>
</div>
<div class="forum_thread" id="thread-<%= thread.id %>">
<%= link_to thread.title, forum_forumthread_path(@forum, thread) %>
</div>
<% end %>
</div>

View File

@@ -24,12 +24,10 @@ Site::Application.routes.draw do
end
resources :forums, path: 'forums' do
collection do
resources :forumgroups, path: 'groups'
end
member do
resources :forumthreads, path: 'threads'
end
resources :forumthreads, path: 'threads'
collection do
resources :forumgroups, path: 'groups'
end
end
match '/status' => 'status#show'