Hi there,
I'm using Paperclip and accepts_nested_attributes for. I'm wondering what is the best way to discard photos (i.e. not save them in the db), if they have {model}_file_size == nil. This could be done using attribute_fu like in the example bellow, using the discard_if option. The Photo class uses Paperclip. However, I don't want to use attribute_fu.
class Stadium
has_many :photos, :as => :parent, :discard_if => proc { |upload| upload.photo_file_size.nil? } # discard_if does not work
accepts_nested_attributes_for :photos
end
Many thanks.