ruby on rails - form not processing as JS -


Then I have the following rail forms, and there are answers to this same governing action: JS, but rail it processed as HTML Does. Not really sure how to proceed. Any ideas?

  form_tag url_ (controller: 'post', verb: 'add_tag'), id: 'enter_tag', remote: true, style: 'display: none:' text_field_tag: tags   

UPDATE: 'Delete the display': None 'fixes this (I was in the form feed) Why is this?

Chris, are you using Rail 3.1? If so, (I'm still at 3.0.10, I'm sure) the jQuery UIs library is automatically included. If that is the case, then it should use an / datatype request, but I believe that this is an xhr request to the railroad and it should be automatically sent to the JS reply.

A quick solution could be changing url_for to url_for (controller: post, verb: 'add_tag', format: 'js') but I believe it should also take the JS answer without it. I do not like this approach because I do not believe that it will also choose your HTML response for non-JS user.

In another fixed format.js controller as its first response format (it can be HTML now), but I have been telling it the reason why it is ajax request Do not recognize it to begin with?

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -