Module: HasModerated::CarrierWave::InstanceMethods

Defined in:
lib/has_moderated/carrier_wave.rb

Instance Method Summary collapse

Instance Method Details

#get_moderation_attributes_with_carrierwaveObject



111
112
113
114
115
116
117
118
119
# File 'lib/has_moderated/carrier_wave.rb', line 111

def get_moderation_attributes_with_carrierwave
  attrs = get_moderation_attributes_without_carrierwave
  self.class.moderated_carrierwave_fields.each do |field_name|
    attrs = attrs.merge({
      "#{field_name}_tmp_file" => self.send(field_name).file.file
    }) if self.send(field_name) && self.send(field_name).file
  end
  attrs
end