Displaying 1 result from an estimated 1 matches for "propertyprofil".
Did you mean:
propertyprofile
2006 Aug 26
3
order of saving/validating
...t least one image. " +
self.property_images.count.to_s unless self.property_images.count > 0
end
My controller action to save the form/upload the images looks like -
def create
@property = Property.new(params[:property])
@property_profile = @property.property_profile =
PropertyProfile.new(params[:property_profile])
params[:property_image].each do |file_id, imageFile|
file_id = file_id.to_i
if file_id >= 1 and file_id <= 3
unless imageFile["filename"].nil?
@property_image = PropertyImage.new(imageFile)
@property....