diff options
author | Thiago Pinto <tapgyn@gmail.com> | 2012-12-06 02:05:10 -0500 |
---|---|---|
committer | Thiago Pinto <tapgyn@gmail.com> | 2012-12-06 02:05:10 -0500 |
commit | 7cf2912f062f5836d8fa772325411ab1e04715f2 (patch) | |
tree | a28c9081d8d5ba34ec207eefeb9f105b3d3de837 /actionpack | |
parent | 83cb6fbd13f3c5ea3106b9a57964b1a6fb243682 (diff) | |
download | rails-7cf2912f062f5836d8fa772325411ab1e04715f2.tar.gz rails-7cf2912f062f5836d8fa772325411ab1e04715f2.tar.bz2 rails-7cf2912f062f5836d8fa772325411ab1e04715f2.zip |
correct bad jquery syntax
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 17386a57b8..ce51585b87 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -775,8 +775,8 @@ module ActionView # text_field(:post, :title, class: "create_input") # # => <input type="text" id="post_title" name="post[title]" value="#{@post.title}" class="create_input" /> # - # text_field(:session, :user, onchange: "if $('session[user]').value == 'admin' { alert('Your login can not be admin!'); }") - # # => <input type="text" id="session_user" name="session[user]" value="#{@session.user}" onchange = "if $('session[user]').value == 'admin' { alert('Your login can not be admin!'); }"/> + # text_field(:session, :user, onchange: "if $('#session_user').value == 'admin' { alert('Your login can not be admin!'); }") + # # => <input type="text" id="session_user" name="session[user]" value="#{@session.user}" onchange = "if $('#session_user').value == 'admin' { alert('Your login can not be admin!'); }"/> # # text_field(:snippet, :code, size: 20, class: 'code_input') # # => <input type="text" id="snippet_code" name="snippet[code]" size="20" value="#{@snippet.code}" class="code_input" /> |