Ruby on Rails
Thursday, November 25, 2010
ok, without
:html=>{
is working
just using :method direclty....
On Thu, Nov 25, 2010 at 5:30 PM, tom <tomabroad@gmail.com> 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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment