title: Rails ransack gem to search jsonb column with key value pair as parameter
body: <p>How to properly search on JSONB column, passing key &amp; value as params.</p>
  
  <p>Following this wiki <a href="https://github.com/activerecord-hackery/ransack/wiki/PostgreSQL-JSONB-searches" rel="nofollow noreferrer">https://github.com/activerecord-hackery/ransack/wiki/PostgreSQL-JSONB-searches</a>.</p>
  
  <p>Everything works for me except the bottom part, where said that we can search also by passing key value.</p>
  
  <pre><code>ransacker :within_json do |parent|
     Arel.sql("contacts.json_data::text") 
  end
  </code></pre>
  
  <p>Like: <code>Contact.all.ransack("within_json_cont" =&gt; '{"key": "value"}')</code>
  But can make it work, no result for me.</p>