views:

8

answers:

1

I have

    <%= observe_field :tb_search, 
    :frequency=>0.5, :update=>'reports',
    :url=>{
        :action=>'filter_reports',
        :only_path=>false,
        :user=>@user.id},
    :with=>"'search='+encodeURIComponent(value)" %>

but on the controller side, params[:user] is nil. I did a

    puts "NTHDEONUTHDOEDEUU#{params[:user].nil?}||"

in the responding method in controller to prove to myself that it was nil.

any ideas?

+1  A: 

With this helper I believe you need to pass all params through the :with option. Something like:

<%= observe_field :tb_search, 
    :frequency=>0.5, :update=>'reports',
    :url=>{
      :action=>'filter_reports',
      :only_path=>false},
    :with=>"'search='+encodeURIComponent(value)+'&user='#{@user.id}"
bjg
as it turns out, I was updating the wrong html content, now my problem is that nothing is filtered
DerNalia