This commit is contained in:
2023-02-03 11:49:15 +11:00
parent ac4ff38dba
commit bb12bf7ab8

View File

@@ -32,7 +32,7 @@ module Adamantium
next if tag_name == "" next if tag_name == ""
tag = posts.tags.where(label: tag_name).one || tag = posts.tags.where(label: tag_name).one ||
post posts
.tags .tags
.changeset(:create, {label: tag_name, slug: tag_name.downcase.strip.tr(" ", "-").gsub(/[^\w-]/, "")}) .changeset(:create, {label: tag_name, slug: tag_name.downcase.strip.tr(" ", "-").gsub(/[^\w-]/, "")})
.commit .commit