You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Deal < ActiveRecord::Base
has_many :pictures, :as => :imageable, :dependent => :destroy
has_moderated :title, :excerpt, :description, :conditions, :associations => [ :pictures ]
end
class Picture < ActiveRecord::Base
belongs_to :imageable, :polymorphic => true
mount_uploader :image, PictureUploader
attr_accessible :image
include HasModerated::CarrierWave
has_moderated_create
has_moderated_carrierwave_field :image
end
What happens here is that when I save a deal with a new picture, the moderation object saved in the db is a picture object. I would like the moderation_type to be Deal and save the picture as an association, is this possible?
The text was updated successfully, but these errors were encountered:
These are my models:
What happens here is that when I save a deal with a new picture, the moderation object saved in the db is a picture object. I would like the moderation_type to be Deal and save the picture as an association, is this possible?
The text was updated successfully, but these errors were encountered: