search for: listing_images

Displaying 3 results from an estimated 3 matches for "listing_images".

2006 May 30
1
Can''t read from file field second time around
This piece of code takes an uploaded image and resizes it. It''s a bit nasty at the moment as I am still messing around with it. What I can''t understand is why it works for one iteration but then fails with: zero-length blob not permitted `'' On the line: img = Magick::Image.from_blob(self.image).first I am basically doing this in the controller and it fails on the
2006 May 07
4
Getting column value from lookup table in HABTM relationship
...ble I have a column called ''is_primary_agent'' which denotes if the agent is responsible for the listing - only one agent can be primary. At the moment I use this in my listing_controller''s view action: @listing = Listing.find(@params[:id], :include => [ :agents, :listing_images, :listing_pdfs ] ) What is the best, most efficient way to have this attribute appear against my agents? TIA, Matt.
2006 May 18
0
file_column - filtering uploaded file type and storing image size?
Sorry, more newby FC questions! I would like to use one file upload field to upload both PDFs and images. The images are in the listing_images table and PDFs are in the listing_pdfs table - both have a one-to-many relationship with listings. How do I do this? For listing_images, I would like to store the width and height of the image so I can produce valid xhtml image tags. I can''t see anything in the file_column docs (I am us...