Skip to content

Commit

Permalink
Merge pull request #9096 from tricknotes/fix-code-comment
Browse files Browse the repository at this point in the history
Fix code comment
  • Loading branch information
rafaelfranca committed Jan 28, 2013
2 parents b4fa651 + 8a13721 commit ba6cae4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions actionpack/lib/action_view/helpers/form_helper.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -771,8 +771,8 @@ def label(object_name, method, content_or_options = nil, options = nil, &block)
# text_field(:post, :title, class: "create_input") # text_field(:post, :title, class: "create_input")
# # => <input type="text" id="post_title" name="post[title]" value="#{@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!'); }") # text_field(:session, :user, onchange: "if ($('#session_user').val() === '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!'); }"/> # # => <input type="text" id="session_user" name="session[user]" value="#{@session.user}" onchange="if ($('#session_user').val() === 'admin') { alert('Your login can not be admin!'); }"/>
# #
# text_field(:snippet, :code, size: 20, class: 'code_input') # 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" /> # # => <input type="text" id="snippet_code" name="snippet[code]" size="20" value="#{@snippet.code}" class="code_input" />
Expand All @@ -792,8 +792,8 @@ def text_field(object_name, method, options = {})
# password_field(:account, :secret, class: "form_input", value: @account.secret) # password_field(:account, :secret, class: "form_input", value: @account.secret)
# # => <input type="password" id="account_secret" name="account[secret]" value="#{@account.secret}" class="form_input" /> # # => <input type="password" id="account_secret" name="account[secret]" value="#{@account.secret}" class="form_input" />
# #
# password_field(:user, :password, onchange: "if $('user[password]').length > 30 { alert('Your password needs to be shorter!'); }") # password_field(:user, :password, onchange: "if ($('#user_password').val().length > 30) { alert('Your password needs to be shorter!'); }")
# # => <input type="password" id="user_password" name="user[password]" onchange = "if $('user[password]').length > 30 { alert('Your password needs to be shorter!'); }"/> # # => <input type="password" id="user_password" name="user[password]" onchange="if ($('#user_password').val().length > 30) { alert('Your password needs to be shorter!'); }"/>
# #
# password_field(:account, :pin, size: 20, class: 'form_input') # password_field(:account, :pin, size: 20, class: 'form_input')
# # => <input type="password" id="account_pin" name="account[pin]" size="20" class="form_input" /> # # => <input type="password" id="account_pin" name="account[pin]" size="20" class="form_input" />
Expand Down

0 comments on commit ba6cae4

Please sign in to comment.