Hi there I´m trying to get working a bunch of chained
collection selects
so it is like this
from 2 collection selects I replace 2 divs (just text) and
generate 2
more collections selects depeneding on the results from the
first 2,
but then I need to generate to more collection selects, but
it fails,
since when the page is loaded the collection to generete the
collection_select is not net created (it comes from the past
2)
collection selects, I´m kind of lost of how to solve this
problem.
does anyone have a tip that could I borrow
I´m using rjs to update multiple divs and I´ve tried
render :update do |page|
page.replace_html 'apDiv5', nfc[0].name
page.replace_html 'apDiv9', nfc[1].name
page.replace 'apDiv11', :partial => 'ter',
:collection => nfc
end
but apDiv11 does not work (i have tried replace and
replace_html)
the _ter.html.erb has
<%= f.collection_select :key_word ..... %>
also I have tried
page.replace_html 'apDiv10',
' <select id="perro_gato"
name="perro[gato]"><option
value="1">1</option>
<option
value="4">4</option></select>
'
and it works but there has to be a better solution, and it
doesnt
solve me the problem of the later collection not existing
when the
page is loaded
thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
|