Commit 960ed893 authored by evazion's avatar evazion

wiki_pages/new: fix exception in rendering html data attributes.

Fix exception when trying to get the category_name for the html data
attributes. The wiki title is nil here and Tag.category_for couldn't
handle a nil tag name.
parent 69f653b0
......@@ -158,6 +158,8 @@ class Tag < ApplicationRecord
end
def category_for(tag_name, options = {})
return Tag.categories.general if tag_name.blank?
if options[:disable_caching]
select_category_for(tag_name)
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment