From a78e6301c614589e2c9e64df77395acce180d219 Mon Sep 17 00:00:00 2001 From: Carlos Palhares Date: Fri, 10 May 2024 17:48:16 -0300 Subject: [PATCH] try --- .github/workflows/audiences-multi.yml | 16 ++++++++-------- audiences/app/models/audiences/users_search.rb | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/audiences-multi.yml b/.github/workflows/audiences-multi.yml index bc85bb71..35360b26 100644 --- a/.github/workflows/audiences-multi.yml +++ b/.github/workflows/audiences-multi.yml @@ -52,21 +52,21 @@ jobs: - uses: actions/checkout@v3 - name: Install non-ruby dependencies run: sudo apt-get install libpq-dev - - name: 'mysql2 adapter' + - name: 'postgresql adapter' uses: powerhome/github-actions-workflows/ruby-gem@rubygem-action env: - DATABASE_ADAPTER: mysql2 - DATABASE_PORT: 3306 + DATABASE_ADAPTER: postgresql + DATABASE_PORT: 5432 with: workdir: audiences ruby: ${{ matrix.ruby }} - gemfile: ${{ matrix.gemfile }} - - name: 'postgresql adapter' + gemfile: ${{ matrix.gemfile }} + - name: 'mysql2 adapter' uses: powerhome/github-actions-workflows/ruby-gem@rubygem-action env: - DATABASE_ADAPTER: postgresql - DATABASE_PORT: 5432 + DATABASE_ADAPTER: mysql2 + DATABASE_PORT: 3306 with: workdir: audiences ruby: ${{ matrix.ruby }} - gemfile: ${{ matrix.gemfile }} + gemfile: ${{ matrix.gemfile }} \ No newline at end of file diff --git a/audiences/app/models/audiences/users_search.rb b/audiences/app/models/audiences/users_search.rb index 534fd66a..fb47b596 100644 --- a/audiences/app/models/audiences/users_search.rb +++ b/audiences/app/models/audiences/users_search.rb @@ -27,7 +27,7 @@ def users private def result - @result ||= @scope.where("#{data_attribute_query} LIKE ?", "%#{@query}%") + @result ||= @scope.where("to_json(data) LIKE ?", "%#{@query}%") end def data_attribute_query