FIX: couldn't uncategorize a topic

This commit is contained in:
Régis Hanol
2015-02-16 10:31:36 +01:00
parent f7fa13049c
commit 0b45054e2b
2 changed files with 6 additions and 1 deletions

View File

@ -133,7 +133,7 @@ class TopicsController < ApplicationController
end
changes.delete(:title) if topic.title == changes[:title]
changes.delete(:category_id) if (changes[:category_id].blank? or topic.category_id == changes[:category_id].to_i)
changes.delete(:category_id) if topic.category_id == changes[:category_id].to_i
success = true
if changes.length > 0