I have the folowing migration but don't know what to use in the down method
change_table :addresses do |t|
t.references :addressable, :polymorphic => true
end
I have the folowing migration but don't know what to use in the down method
change_table :addresses do |t|
t.references :addressable, :polymorphic => true
end
What's wrong with this?
def self.down
remove_column :addresses, :addressable
end
What's the problem?
def self.down
remove_column :addresses, :addressable_type
remove_column :addresses, :addressable_id
end
actually,
change_table :addresses do |t|
t.remove_references :addressable
end
would be a bit railsier, no?