Connecting Tech Pros Worldwide Help | Site Map

how to create a ruby variable from a database column entry

 
LinkBack Thread Tools Search this Thread
  #1  
Old April 5th, 2008, 08:32 AM
Member
 
Join Date: Jun 2007
Posts: 47
Default how to create a ruby variable from a database column entry

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
Reply
  #2  
Old April 5th, 2008, 09:38 AM
Member
 
Join Date: Jun 2007
Posts: 47
Default

got it!

Mystuff.find(:id).title
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.