Skip to content

Commit

Permalink
FIX: tags created from category modal need to be normalized as usual
Browse files Browse the repository at this point in the history
  • Loading branch information
nlalonde committed Jun 1, 2016
1 parent 31c0a22 commit c3ceb6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ def apply_permissions
end
end

def allowed_tags=(tag_names)
def allowed_tags=(tag_names_arg)
tag_names = DiscourseTagging.tags_for_saving(tag_names_arg, Guardian.new(Discourse.system_user)) || []
if self.tags.pluck(:name).sort != tag_names.sort
self.tags = Tag.where(name: tag_names).all
if self.tags.size < tag_names.size
Expand Down

0 comments on commit c3ceb6e

Please sign in to comment.