Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

how to create a ruby variable from a database column entry

Question posted by: ateale (Member) on April 5th, 2008 08:32 AM
Hi Guys,

I am trying to get up to speed with Rails and enjoying it so far

One thing I cant work out so far and has eaten up most of my day!:
how to find an entry in a database and set it as a ruby variable?

I want to find the 'title' an an id/entry in my mysql DB and then use ruby to create a directory on my machine with that title as the name

Any ideas? I hope that makes some sense!

Cheers!

Adam
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
ateale's Avatar
ateale
Member
46 Posts
April 5th, 2008
09:38 AM
#2

Re: how to create a ruby variable from a database column entry
got it!

Mystuff.find(:id).title

Reply
Reply
Not the answer you were looking for? Post your question . . .
174,847 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Top Ruby / Rails Forum Contributors