title: No operator matches the given name and argument type in pg backed rails app
body: <p>First I implemented a sample search functionality a rails app using <strong>SQLITE</strong> as the database.</p>
  
  <p>And the query was as follows:</p>
  
  <p><code>@productions = Production.where('productions.status like ?', "%#{params[:filter]}%")
  </code>
  This worked fine. I was able to filter the record based on the statuses.</p>
  
  <p>Now I am implementing same logic on a bigger app only difference is it is backed by <strong>POSTGRESQL</strong></p>
  
  <p>The logic</p>
  
  <p><code>@ride_later_requests = RideLaterRequest.where('ride_later_requests.status like ?', "%#{params[:filter]}%")
  </code>
  When I hit filter this time I got some error saying </p>
  
  <pre><code>LINE 1: ...later_requests" WHERE (ride_later_requests.status like '%8%'...
                                                               ^
  HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
  : SELECT "ride_later_requests".* FROM "ride_later_requests" WHERE (ride_later_requests.status like '%8%')):
  </code></pre>
  
  <p>What am I doing wrong here ? Is this something related to pg ? Please help fix this.</p>
  
  <p><strong>schema</strong></p>
  
  <pre><code>create_table "ride_later_requests", force: :cascade do |t|
  
      t.string   "customer_name"
      t.integer  "status"
  end
  </code></pre>
  
  <p><strong>RideLaterRequest.rb</strong></p>
  
  <pre><code>enum status:{
      UnderConstruction:1,
      Submitted: 2,
      Unfulfilled:3,
      QuotesReady:4,
      Fulfilled: 5,
      Rejected:6,
      Ignored:7,
      Cancelled:8,
      Expired:9
    }
  </code></pre>