このように定義された3つのクラスPicture、Employee、およびProductがあります
Class Picture < ActiveRecord::Base
belongs_to :imageable, :polymorphic => true
end
class Employee < ActiveRecord::Base
has_many :pictures, :as => :imageable
end
class Product < ActiveRecord::Base
has_many :pictures, :as => :imageable
end
画像のモデル名を画像に変更したいです。ポリモーフィック アソシエーションに関して、何を更新する必要がありますか?