Drop down menu to show directories

Hi Guys,

Can anyone recommend a way to have a drop down menu that show a list of

In my controller I have:
@files = [Dir.glob(’/mydirectoryofcoolfiles/*’) ]

Then the form I am unsure of how to do it:
<%= f.collection_select :job_id, @files, :id, :job_title, :prompt =>
“Select a shot” %>

The app has a directory with lots of ‘job’ directories in it.
Each job folder has a number of ‘asset’ folders in it.

I want the user to select a ‘job’ in a dropdown menu, and then a second
menu lists the folders in that particular folder

any ideas?



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs