Skip to content

A platform for community discussion. Free, open, simple.

FIX: id is always true since it's been to_i'd

Daniel Waterworth594925b8965a
diff --git a/app/controllers/list_controller.rb b/app/controllers/list_controller.rb
index 7a3caaabdf4..e7c0de86dc1 100644
--- a/app/controllers/list_controller.rb
+++ b/app/controllers/list_controller.rb
@@ -360,7 +360,7 @@ class ListController < ApplicationController
@category = Category.query_category(slug_or_id, parent_category_id)
# Redirect if we have `/c/:parent_category/:category/:id`
- if id
+ if params.include?(:id)
category = Category.find_by_id(id)
(redirect_to category.url, status: 301) && return if category
end