Ruby on Rails Thursday, August 22, 2013

Tamouse,

I really appreciate this, and apologize for the partial code...

`wine` is the parameter of a render function:

function renderDetails(wine) { $('#wineId').val(wine.id); $('#name').val(wine.name); $('#grapes').val(wine.grapes); $('#country').val(wine.country); $('#region').val(wine.region); $('#year').val(wine.year); $('#pic').attr('src', wine.picture); $('#description').val(wine.description); }

During runtime, the variable is filled with this JSON:

  1. wineObject
    1. country"France"
    2. description"The aromas of fruit and......"
    3. grapes"Grenache / Syrah"
    4. id1
    5. name"CHATEAU DE SAINT COSME"
    6. picture"saint_cosme.jpg"
    7. region"Southern Rhone / Gigondas"
    8. year"2009"
  2. PS I am new to Rails, so please forgive the noob :)
Thanks in Advance,

Nick.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ca591adb-12da-433c-a2de-884b42de529c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment