diff options
author | Vishnu Atrai <me@vishnuatrai.com> | 2013-06-29 20:25:00 +0530 |
---|---|---|
committer | Vishnu Atrai <me@vishnuatrai.com> | 2013-06-29 20:25:15 +0530 |
commit | f5599826d4e88f9ae991a5a515668d241bff9325 (patch) | |
tree | b4fbea35714039633298a98243830c04db8f7989 | |
parent | 1f35f04bf3dbc0c9cb4d213bbbc3cf0faf58c766 (diff) | |
download | rails-f5599826d4e88f9ae991a5a515668d241bff9325.tar.gz rails-f5599826d4e88f9ae991a5a515668d241bff9325.tar.bz2 rails-f5599826d4e88f9ae991a5a515668d241bff9325.zip |
doc for more input tag types
-rw-r--r-- | guides/source/action_view_overview.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/guides/source/action_view_overview.md b/guides/source/action_view_overview.md index b3fc61f386..bdb51d881d 100644 --- a/guides/source/action_view_overview.md +++ b/guides/source/action_view_overview.md @@ -1006,6 +1006,24 @@ text_field(:post, :title) # => <input type="text" id="post_title" name="post[title]" value="#{@post.title}" /> ``` +#### email_field + +Returns an input tag of the "email" type tailored for accessing a specified attribute. + +```ruby +email_field(:user, :email) +# => <input type="email" id="user_email" name="user[email]" value="#{@user.email}" /> +``` + +#### url_field + +Returns an input tag of the "url" type tailored for accessing a specified attribute. + +```ruby +url_field(:user, :url) +# => <input type="url" id="user_url" name="user[url]" value="#{@user.url}" /> +``` + ### FormOptionsHelper Provides a number of methods for turning different kinds of containers into a set of option tags. @@ -1372,6 +1390,24 @@ text_field_tag 'name' # => <input id="name" name="name" type="text" /> ``` +#### email_field_tag + +Creates a standard input field of email type. + +```ruby +email_field_tag 'email' +# => <input id="email" name="email" type="email" /> +``` + +#### url_field_tag + +Creates a standard input field of url type. + +```ruby +url_field_tag 'url' +# => <input id="url" name="url" type="url" /> +``` + #### date_field_tag Creates a standard input field of date type. |