Ruby on Rails
Thursday, January 9, 2014
On Wednesday, January 8, 2014 10:18:33 PM UTC, Himanshu Vikram Tantia wrote:
Hello,I'm trying to use collection select to implement filtering for my page. The idea is there are a bunch of posts and I want to implement record filtering for those.The first collection box would have parameters like "Date", "Amount", "Category" and based on the selection of this a secondary drop down would appear and allow the user to make a selection. The records on this page would be then filtered based on both the selection.I have been trying out many things and have googled a lot on collection but I have reached a dead end now. I'm pretty new and just started learning ROR.You help is much appreciated here.Thanks in advance.Note: the code below might be wrong and as of now its not even compiling.. currently it complaints of "remote_function" not defined...
remote_function was removed in rails 3.1 (it is still available as part of the prototype-rails (https://github.com/rails/prototype-rails) gem
In general people are moving away from explicit onchange functions. Instead (using jquery) you'd do somthing like
$('#a_select_box').on('change', function(){
//this javascript is called when the drop down with id a_select_box is changed
})
Fred
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/6b758960-99d3-4ba5-82d6-d52cb27e74d8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment