ok, without
:html=>{
is working
just using :method direclty....
On Thu, Nov 25, 2010 at 5:30 PM, tom
<tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> hi,
>
> i used to have a index file with a partial. that partial holds a
> searchform, until now with a regular form_for / post towards the parent
> index action. the results were only be fetched / displayed if certain
> conditions are true. this is all working fine.
>
> Now im trying to get the remote_form_for working so that i can make use of
> ajax, but:
>
> <% remote_form_for :mysearchcontroller, :url => { :action =>
"index"}
> ,:html=>{ :method => "get" , :id=>"formX"} do
%>
>
> always produces this:
>
> <form onsubmit="new
Ajax.Request(''/mysearchcontroller'', {asynchronous:true,
> evalScripts:true, parameters:Form.serialize(this)}); return false;"
> method="get" id="formX"
action="/mysearchcontroller">
>
> but the server logs says this:
>
> Processing MysearchcontrollerController#create (for 192.168.178.21 at
> 2010-11-25 17:22:45) [POST]
> Parameters: {"......
>
>
> why is that and where is my mistake? it actually doesnt matter what action
> i specify, even a custom action, it always goes to create...
>
> thx
>
>
> ps: mysearchcontroller is a fake name
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.