[file_column] Problem displaying images after upload


#1

This is the last major hurdle in my little app and I can’t seem to
figure it out. I am using file_column to upload images. The upload
(and rmajick goodness) works just fine, but when I try to display the
resulting image I get this error:

undefined method `image_relative_path’ for #Array:0x252b694

In script/console I can do this however:

Entry.find(:first).image_relative_path
=> “1/testpic.jpg”

I think this might have todo with the way I am building @entry via a
find_by_sql:

 def self.mine
          find_by_sql("select entries.id,entries.image,

species.name, length,species.multiplier*length as score,caught_on
from entries join species on species_id = species.id order by score
DESC")

end

Any ideas what I am doing wrong?

  • Bill