From b3beb8ef13de930c6073ed27531d1676cab7c186 Mon Sep 17 00:00:00 2001 From: jomo Date: Sat, 1 Feb 2014 19:48:40 +0100 Subject: [PATCH] fixed bug with double :id in path --- app/views/forums/show.html.erb | 8 +++----- config/routes.rb | 10 ++++------ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 19633b2..2f681fa 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -1,12 +1,10 @@ <%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= link_to @forum %>

<%= @forum.name %>

-<%= link_to "New thread", new_forumthread_path, class: "btn blue" %> +<%= link_to "New thread", new_forum_forumthread_path(@forum), class: "btn blue" %>
<% @threads.each do |thread| %> -
-
- <%= link_to thread.title, forumthread_path(thread) %> -
+
+ <%= link_to thread.title, forum_forumthread_path(@forum, thread) %>
<% end %>
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 6c7b120..75a0216 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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'