I am having a problem in my users_controller.

hobo_user_controller
auto_actions :all

I have defined an 'update' method.  It works perfect,
and has this respond_to in it:

respond_to do |wants|
        wants.html { }
        wants.js

I defined a search method:

index_action :search

  def search
    @myclients = User.search params[:search], :conditions =>
{:category => :client}
    respond_to do |wants|
      wants.html
      wants.js
    end
  end

The above does not work. I have used identical formats in
the rjs file and partial of the search method as I did in the update
method.

The output from my search to my page is:

$("searchresults").replacehtml({"partial": "search", "object":
[null]});

This is just dumped to the page, and not output in the searchresults
div as it should be.

(the null part is not an error, as my object is null at this point).

For some reason it does not seem like I am flowing through the
rjs file and the partial.

I did notice one difference in the URL's:

In the search method my URL (URI??) is

   http://padhouses.com/users/search?search=modern

While when using the update method it is

    http://padhouses.com

In the update I am doing a post, while in the search I am doing
a get. Still, it seems that it is an AJAX request, that they would
both be the same.


Here is the form I am using, no implicit context AFAIK:

<form   action="/users/search" method="get"  update="searchresults">
        <input id="search" type="text" name="search"  />
        <submit id="searchsubmit" label="SEARCH" />
</form>

If there is more hobo-esque way of doing above, please let me know.

Anyway, if anyone would have an idea of why this is broken,
I would be as pleased as punch to hear it.

Cheers,

   Jet

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to