title: how to generate migration to make references polymorphic
body: <p>I have a Products table and want to add a column:</p>
  
  <pre><code>t.references :imageable, :polymorphic =&gt; true
  </code></pre>
  
  <p>I was trying to generate migration for this by doing:</p>
  
  <pre><code>$ rails generate migration AddImageableToProducts imageable:references:polymorphic
  </code></pre>
  
  <p>but I am obviously doing it wrong. Can anybody make any suggestion? Thanks</p>
  
  <p>When I try to manually put it in after generating the migration, I did it like this:</p>
  
  <pre><code>class AddImageableToProducts &lt; ActiveRecord::Migration
    def self.up
      add_column :products, :imageable, :references, :polymorphic =&gt; true
    end
  
    def self.down
      remove_column :products, :imageable
    end
  end
  </code></pre>
  
  <p>and it still hasn't worked</p>