title: SQLite3::SQLException : no such column in rails 4.2.6
body: <p>I am  facing this SQLite exception error when running my application:</p>
  
  <blockquote>
    <p>SQLite3::SQLException at /admin</p>
    
    <p>no such column: subscription_plan.name</p>
  </blockquote>
  
  <p>This is the controller code, I am facing error:</p>
  
  <pre><code>def dashboard
    @number = {
        :month =&gt; Subscription.includes(:subscription_plan).where(['subscriptions.created_at &gt; ? AND subscriptions.amount &gt; ? AND subscription_plan.name = ?', Time.zone.now.beginning_of_month, 0, 'month']).count,
        :year =&gt; Subscription.includes(:subscription_plan).where(['subscriptions.created_at &gt; ? AND subscriptions.amount &gt; ? AND subscription_plan.name = ?', Time.zone.now.beginning_of_month, 0, 'year']).count
      }
  end
  </code></pre>
  
  <p>This is Subscription model with relation:</p>
  
  <pre><code>class Subscription &lt; ActiveRecord::Base
    belongs_to :subscription_plan
  end
  </code></pre>
  
  <p>There is no subscription_plan model in my application, but the data to this table is populated through <em>seeds.rb</em> file.
  As shown in the controller, 'month', 'year' are some of the names in subscription_plan table.</p>
  
  <p>It is working fine with Rails 3.2, i don't know why it's not working with 4.2.6. Please help.</p>