title: SQLite3::SQLException: unrecognized token: ":":
body: <p>I'm having trouble running pg_search. I think it's set up correctly, but for some reason when trying to run a search, this comes up:</p>
  
  <pre><code>SQLite3::SQLException: unrecognized token: ":": SELECT "courses".*, ((ts_rank((to_tsvector('simple',
  coalesce("courses"."title"::text, ''))), (to_tsquery('simple', ''' ' || 'finance' || ' ''')), 0))) AS
  pg_search_rank FROM "courses"  WHERE (((to_tsvector('simple', coalesce("courses"."title"::text, '')))
  @@ (to_tsquery('simple', ''' ' || 'finance' || ' ''')))) ORDER BY pg_search_rank DESC, "courses"."id" ASC
  </code></pre>
  
  <p>Course model:</p>
  
  <pre><code>include PgSearch
  scope :by_course_title, lambda { |ttl|
    _by_course_title(ttl) if ttl.present? }
  pg_search_scope :_by_course_title, against: :title
  </code></pre>
  
  <p>Search Controller:</p>
  
  <pre><code>def index
      @course = Course.by_course_title(params[:fname])
  end
  </code></pre>
  
  <p>In the html:</p>
  
  <pre><code>&lt;% @course.each do |courses| %&gt;
      &lt;div&gt;&lt;%= courses %&gt;&lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Is it possible that this is caused by the .each? If I only keep &lt;%= @course %>, the page loads up and shows:</p>
  
  <pre><code>#&lt;ActiveRecord::Relation:0x....&gt;
  </code></pre>
  
  <p>Am I supposed to convert the resulting array before passing the .each function?</p>