'select' in RJS

Hi All

I just tried (in a .rjs file)

page[:noq].innerHTML = select(“post”, “person”, 1.upto(10) {|p| [ p, p ]
} )

It didn’t work. I also included the ‘select’ helper in the controller,
but that didn’t help. I have to add that all this works when using HTML
instead of the select helper!

Any suggestion what I do wrong in this select call.


LuCa wrote:

page[:noq].innerHTML = select(“post”, “person”, 1.upto(10) {|p| [ p, p ]

You probably mean page.replace_html :noq, select…

If that doesn’t work, try :inline => “<%= select… %>”

“Test Driven Ajax (on Rails)”
assert_xpath, assert_javascript, & assert_ajax

hmmm, didn’t work, although the ‘text_field’ helper does. I get the
feeling something is wrong with the select statement, suggestions ?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs