Create code posts

This commit is contained in:
2024-03-04 21:34:12 +11:00
parent 4277bde352
commit 56edde6ab5
13 changed files with 155 additions and 53 deletions

View File

@@ -13,7 +13,7 @@ module Micropub
posts.transaction do
new_post = posts.changeset(:create, post_attrs).commit
post_attrs[:category].each do |tag_name|
post_attrs[:category]&.each do |tag_name|
next if tag_name == ""
tag = posts.tags.where(label: tag_name).one ||