We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4acd73c commit 39a19f7Copy full SHA for 39a19f7
app/helpers/categories_helper.rb
@@ -9,7 +9,8 @@ def expandable?
9
(defined?(@category) && !@category&.id.nil? && !current_page?(new_category_url)) ||
10
(defined?(@post) && !@post&.category.nil?) ||
11
(defined?(@question) && !@question&.category.nil?) ||
12
- (defined?(@article) && !@article&.category.nil?)
+ (defined?(@article) && !@article&.category.nil?) ||
13
+ (defined?(@edit) && !@edit&.post&.category&.nil?)
14
end
15
16
def current_category
@@ -21,6 +22,8 @@ def current_category
21
22
@question.category
23
elsif defined?(@article) && !@article&.category.nil?
24
@article.category
25
+ elsif defined?(@edit) && !@edit&.post&.category.nil?
26
+ @edit.post.category
27
28
29
0 commit comments