Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Newbie question -how do I add values to a result?

Reply
Thread Tools

Newbie question -how do I add values to a result?

 
 
Becca Girl
Guest
Posts: n/a
 
      04-23-2008
I know that I'm missing something simple here, but the solution is
evading me.

I want to get the values in the fruits field for my first order.

>> Cart.find(:first, :select => "fruits")

=>#(Car fruits: "apple, orange, pear")

Now I want to add grapefruit to that list and save it back into the
fruits field.

How can I do that?

I know it's something so basic, but I'm missing it.

Thanks!
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie question: How do I add elements to **kwargs in a function? Aaron Garrett Python 3 03-18-2009 05:13 AM
Add hyperlinks dynamically - newbie question JezB ASP .Net 6 05-25-2004 08:12 PM
Add hyperlinks dynamically - newbie question JezB ASP .Net Web Controls 6 05-25-2004 08:12 PM
newbie question on Python tutorial example in section 4.7.1 (default arg values) Porky Pig Jr Python 5 05-03-2004 10:15 PM
dumb newbie question (or newbie dumb question) Jerry C. Perl Misc 8 11-23-2003 04:11 AM



Advertisments