Skip to content

Commit 74cf670

Browse files
authored
FIX: Use is_a? instead of is_a for detecting class (#260)
1 parent 23b83fb commit 74cf670

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/discourse_translator/automatic_translations.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def translatable?(content)
3030

3131
public_categories = Category.where(read_restricted: false).pluck(:id)
3232

33-
if content.is_a(Post)
33+
if content.is_a?(Post)
3434
public_categories.include?(content.topic.category_id)
35-
elsif content.is_a(Topic)
35+
elsif content.is_a?(Topic)
3636
public_categories.include?(content.category_id)
3737
else
3838
false

0 commit comments

Comments
 (0)