Since you’re hard-coding all of this, an even better solution would be
to use a named route. You add named routes in the config/routes.rb
file. Search for ‘named route’ and it’ll give you an example (around
line 10 of a vanilla routes.rb).
In your case you’d probably add something like this:
‘home’, :controller=>‘search’, :action=>‘index’, :arg1=>1, :arg2=>
Then your method call is reduced to:
b>”, :url=>home_url, :update=>‘resultsTable’,
As an observation, you might want to also change :success
to :complete. That way the spinner gets hidden even with an error
response (success only triggers with a 200 response).
On Oct 8, 4:17 pm, Zoran K. [email protected]