From f295c5e4f34eb1e4bc73617acebf0f16b2d7ac4a Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Wed, 9 Mar 2016 10:54:39 -0500 Subject: nil tags fixes, remove extraneous use_transaction --- src/guff/models/post.cr | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/guff/models/post.cr b/src/guff/models/post.cr index 9a740bc..98a0226 100644 --- a/src/guff/models/post.cr +++ b/src/guff/models/post.cr @@ -333,7 +333,6 @@ module Guff site_id: site_id, post_id: post_id, tags: tags, - use_transaction: false, ) end @@ -392,9 +391,9 @@ module Guff if tags # update tags set_tags( - site_id: site_id, - post_id: post_id, - tags: tags, + site_id: site_id, + post_id: post_id, + tags: tags as Array(String), ) end end @@ -420,9 +419,9 @@ module Guff def set_tags( site_id = nil : Int?, post_id = nil : Int?, - tags = [] of String : Array(String)?, + tags = [] of String : Array(String), ) - return unless post_id && tags + return unless post_id # build sql args args = { -- cgit v1.2.3