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

Discussion in 'Ruby' started by Becca Girl, Apr 23, 2008.

  1. Becca Girl

    Becca Girl Guest

    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/.
     
    Becca Girl, Apr 23, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. J.Ram
    Replies:
    7
    Views:
    680
  2. Pavel
    Replies:
    7
    Views:
    561
    Pavel
    Sep 19, 2010
  3. Lakshmi Sreekanth

    i = 10; result = ++i - --i; How result become ZERO

    Lakshmi Sreekanth, Sep 21, 2010, in forum: C Programming
    Replies:
    52
    Views:
    1,235
    Nick Keighley
    Sep 23, 2010
  4. Mr. Buffoon
    Replies:
    4
    Views:
    352
    Eric Sosman
    Sep 23, 2010
  5. Michael Tan
    Replies:
    32
    Views:
    1,075
    Ara.T.Howard
    Jul 21, 2005
Loading...

Share This Page