Find files in directory


For my rails program I need to be able to look in a folder for an image
file and then display the file name and image on screen.

I was wondering if it is possible to do that, and how the best way to do
it would be?

Thanks a lot,

Build a non-active record model that can looks thru the files in the
directory, then handle whatever you need to do. Once you have the
location of the file it shouldn’t be difficult to show it. Best if
the folder of images is in the public directory.

On Thu, Aug 21, 2008 at 11:38 PM, Rob Pa
[email protected] wrote:


Ramon T.


The images would be placed in the public directory. I am just unsure how
to code this, would I need to use dir.each or something along those