Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails' unobtrusive JavaScript not working #151

Open
kwltrs opened this issue Nov 9, 2011 · 0 comments
Open

Rails' unobtrusive JavaScript not working #151

kwltrs opened this issue Nov 9, 2011 · 0 comments

Comments

@kwltrs
Copy link
Contributor

kwltrs commented Nov 9, 2011

Unobtrusive JavaScript is not applied to HTML generated by helpers like link_to and button_to (see http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html).
As a result, linking to restfull resources including HTTP verbs or adding confirm-dialogs to buttons, does not work.

Examples

Should send a DELETE request, but triggers a GET request:

link_to 'Do stuff', any_path(obj), :method => :delete

Should invoke a JavaScript confirm dialog, but the request is sent immediately:

button_to 'Do stuff', any_path(obj), :confirm =>  "Are you sure?"

This issue might relate to the upgrade to Rails 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant