...and the URL of the result page is:

http://padhouses.com/users/clientsearch?search=craftsman

I don't quite undersand this.

Jet

On May 8, 8:27 am, blueHandTalking <[email protected]> wrote:
> Why does my application log show:
>
>    Processing UsersController#show (for 66.165.26.192 at 2010-05-08
> 15:11:31) [GET]
>   Parameters: {"search"=>"craftsman", "action"=>"show",
> "id"=>"clientsearch", "controller"=>"users"}
>
> ...when my form below has the following in the page:
>
> <form onsubmit="Hobo.ajaxRequest(this, ['searchresults']); return
> false;" method="get" action="/users/clientsearch">
>
> This is the action called:
>
> def clientsearch
>     @myclients = User.search params[:search] # , :conditions =>
> {:category => :client}
>
>     respond_to do |wants|
>       wants.html
>       wants.js
>     end
>   end
>
> ...and in routes.rb
>
> map.connect  'users/clientsearch', :controller => 'users', :action =>
> 'clientsearch'
>
> ...Jet
>
> On May 5, 1:55 pm, blueHandTalking <[email protected]> wrote:
>
>
>
> > 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 
> > athttp://groups.google.com/group/hobousers?hl=en.
>
> --
> 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 
> athttp://groups.google.com/group/hobousers?hl=en.

-- 
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