Sha256: f717763efd392e1546c9924a255f71cb910eb237b8eda283bd9154951cbbf62f

Contents?: true

Size: 434 Bytes

Versions: 1

Compression:

Stored size: 434 Bytes

Contents

require 'mobility/backends/active_record/pg_query_methods'
require "mobility/backends/active_record/query_methods"

module Mobility
  module Backends
    class ActiveRecord::Jsonb::QueryMethods < ActiveRecord::QueryMethods
      include ActiveRecord::PgQueryMethods

      private

      def contains_value(key, value, locale)
        build_infix(:'@>', arel_table[key], quote({locale => value }.to_json))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mobility-0.4.0 lib/mobility/backends/active_record/jsonb/query_methods.rb