aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_helper.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-08-28 04:53:50 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-08-28 04:53:50 -0300
commitd630c76f3fef54da4859d540060e90cc294b5516 (patch)
treedbeda03ec85e3774f0a72e4041e9026f39ac9c67 /actionpack/lib/action_view/helpers/form_helper.rb
parent5c2b6c55a08564bd6ee36a25c8155e90f002306a (diff)
downloadrails-d630c76f3fef54da4859d540060e90cc294b5516.tar.gz
rails-d630c76f3fef54da4859d540060e90cc294b5516.tar.bz2
rails-d630c76f3fef54da4859d540060e90cc294b5516.zip
type="password" for password_fields
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 938da7aea7..d749e31e12 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -624,16 +624,16 @@ module ActionView
#
# ==== Examples
# password_field(:login, :pass, :size => 20)
- # # => <input type="text" id="login_pass" name="login[pass]" size="20" value="#{@login.pass}" />
+ # # => <input type="password" id="login_pass" name="login[pass]" size="20" value="#{@login.pass}" />
#
# password_field(:account, :secret, :class => "form_input")
- # # => <input type="text" 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!'); }")
- # # => <input type="text" id="user_password" name="user[password]" value="#{@user.password}" onchange = "if $('user[password]').length > 30 { alert('Your password needs to be shorter!'); }"/>
+ # # => <input type="password" id="user_password" name="user[password]" value="#{@user.password}" onchange = "if $('user[password]').length > 30 { alert('Your password needs to be shorter!'); }"/>
#
# password_field(:account, :pin, :size => 20, :class => 'form_input')
- # # => <input type="text" id="account_pin" name="account[pin]" size="20" value="#{@account.pin}" class="form_input" />
+ # # => <input type="password" id="account_pin" name="account[pin]" size="20" value="#{@account.pin}" class="form_input" />
#
def password_field(object_name, method, options = {})
InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("password", options)