Displaying 2 results from an estimated 2 matches for "photo_fil".
Did you mean:
photo_file
2006 Feb 23
7
How to set a relationship with a value from a selection list
...k => true}) %>
This work in so much as I can see the albums being listed in the
selection list.
Then in my photo_controller I''m trying to set the relationship when the
photo is saved in a method called ''create''
def create
@photo = Photo.new(params[:photo])
@photo_file = PhotoFile.new(params[:photo_file])
@photo.photo_file = @photo_file
@photo.album = @post.album_id
@photo.blog_user_id = 1
if @photo.save!
flash[:notice] = ''Photo was successfully created.''
redirect_to :action => ''list''
else
render :acti...
2009 Jan 24
0
reprocess attachment_fu thumbnails with ImageMagick edits
...ld_changed? && self.sold?
for photo in self.photos
imagelist = Magick::ImageList.new
imagelist.read(File.join(RAILS_ROOT, "public",
photo.public_filename), File.join(RAILS_ROOT, "assets", "sold.png"))
imagelist.flatten_images.write(photo_file)
photo.save!
end
end
end
Does anyone know why calling ''photo.save!'' would discard my
ImageMagick changes? When I try the same function without calling
photo.save!, my original image is modified exactly as I intend but the
thumbnails are not updated.
If anyone...