Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old April 5th, 2008, 09:32 AM
Member
 
Join Date: Jun 2007
Posts: 46
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, 10:38 AM
Member
 
Join Date: Jun 2007
Posts: 46
Default

got it!

Mystuff.find(:id).title
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 network members.
Post your question now . . .
It's fast and it's free

Popular Articles