Skip to content

Commit

Permalink
Cast JSON as TEXT instead of CHAR
Browse files Browse the repository at this point in the history
  • Loading branch information
xjunior committed May 10, 2024
1 parent 87d0298 commit b0d2b04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion audiences/app/models/audiences/users_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def users
private

def result
@result ||= @scope.where("CAST(data as CHAR) LIKE ?", "%#{@query}%")
@result ||= @scope.where("CAST(data AS TEXT) LIKE ?", "%#{@query}%")
end
end
end

0 comments on commit b0d2b04

Please sign in to comment.