Keybase proof
I hereby claim:
- I am hanka on github.
- I am hanna_urbit (https://keybase.io/hanna_urbit) on keybase.
- I have a public key ASCux6hUFB95Stwzg0yZbhF_r5_4cWN4B2W_CgveBuH0Pwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
remove_polymorphic_foreign_key :images, :users, column: :imageable |
add_polymorphic_foreign_key :images, :users, column: :imageable | |
add_polymorphic_foreign_key :images, :items, column: :imageable |
class User < ActiveRecord::Base | |
has_many :images, as: :imageable | |
end |
class Item < ActiveRecord::Base | |
has_many :images, as: :imageable | |
end |
class Image < ActiveRecord::Base | |
belongs_to :imageable, polymorphic: true | |
end |