title: Unknown key in Rails association
body: <p>I have the following associations code:</p>
  
  <pre><code>has_many :rates_without_dimension, :as =&gt; :rateable, :class_name =&gt; "Rate",
    :dependent =&gt; :destroy, :conditions =&gt; {:dimension =&gt; nil}
  has_many :raters_without_dimension, :through =&gt; :rates_without_dimension,
    :source =&gt; :rater  
  
  has_one :rate_average_without_dimension, :as =&gt; :cacheable,
    :class_name =&gt; "RatingCache", 
  :dependent =&gt; :destroy, :conditions =&gt; {:dimension =&gt; nil}
  
  
  dimensions.each do |dimension|        
    has_many "#{dimension}_rates", :dependent =&gt; :destroy, 
      :conditions =&gt; {:dimension =&gt; dimension.to_s}, 
      :class_name =&gt; "Rate", 
      :as =&gt; :rateable
  
    has_many "#{dimension}_raters", :through =&gt; "#{dimension}_rates",
      :source =&gt; :rater         
  
    has_one "#{dimension}_average", :as =&gt; :cacheable, :class_name =&gt; "RatingCache", 
      :dependent =&gt; :destroy, :conditions =&gt; {:dimension =&gt; dimension.to_s}
  end   
  </code></pre>
  
  <p>It raises an error:</p>
  
  <pre><code>Unknown key: :conditions. Valid keys are: :class_name, :class, :foreign_key, :validate, :autosave, :table_name, :before_add, :after_add, :before_remove, :after_remove, :extend, :primary_key, :dependent, :as, :through, :source, :source_type, :inverse_of, :counter_cache
  </code></pre>
  
  <p>I tried to change the first line into:</p>
  
  <pre><code>has_many :rates_without_dimension, :as =&gt; :rateable, :class_name =&gt; "Rate", :dependent =&gt; :destroy,-&gt; { where(:dimension =&gt; nil) }
  </code></pre>
  
  <p>But it also raised an error, can you point me to what is wrong with it?</p>