From 1f35f04bf3dbc0c9cb4d213bbbc3cf0faf58c766 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Sat, 29 Jun 2013 17:21:03 +0530 Subject: [PATCH 1/4] cookies are encrypted starting Rails 4 --- guides/source/action_controller_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md index 6a91418e1f..6d8e620695 100644 --- a/guides/source/action_controller_overview.md +++ b/guides/source/action_controller_overview.md @@ -346,7 +346,7 @@ Your application has a session for each user in which you can store small amount All session stores use a cookie to store a unique ID for each session (you must use a cookie, Rails will not allow you to pass the session ID in the URL as this is less secure). -For most stores, this ID is used to look up the session data on the server, e.g. in a database table. There is one exception, and that is the default and recommended session store - the CookieStore - which stores all session data in the cookie itself (the ID is still available to you if you need it). This has the advantage of being very lightweight and it requires zero setup in a new application in order to use the session. The cookie data is cryptographically signed to make it tamper-proof, but it is not encrypted, so anyone with access to it can read its contents but not edit it (Rails will not accept it if it has been edited). +For most stores, this ID is used to look up the session data on the server, e.g. in a database table. There is one exception, and that is the default and recommended session store - the CookieStore - which stores all session data in the cookie itself (the ID is still available to you if you need it). This has the advantage of being very lightweight and it requires zero setup in a new application in order to use the session. The cookie data is cryptographically signed to make it tamper-proof. And it is also encrypted so anyone with access to it can't read its contents. (Rails will not accept it if it has been edited). The CookieStore can store around 4kB of data — much less than the others — but this is usually enough. Storing large amounts of data in the session is discouraged no matter which session store your application uses. You should especially avoid storing complex objects (anything other than basic Ruby objects, the most common example being model instances) in the session, as the server might not be able to reassemble them between requests, which will result in an error. From f5599826d4e88f9ae991a5a515668d241bff9325 Mon Sep 17 00:00:00 2001 From: Vishnu Atrai Date: Sat, 29 Jun 2013 20:25:00 +0530 Subject: [PATCH 2/4] doc for more input tag types --- guides/source/action_view_overview.md | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) 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) # => ``` +#### email_field + +Returns an input tag of the "email" type tailored for accessing a specified attribute. + +```ruby +email_field(:user, :email) +# => +``` + +#### url_field + +Returns an input tag of the "url" type tailored for accessing a specified attribute. + +```ruby +url_field(: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' # => ``` +#### email_field_tag + +Creates a standard input field of email type. + +```ruby +email_field_tag 'email' +# => +``` + +#### url_field_tag + +Creates a standard input field of url type. + +```ruby +url_field_tag 'url' +# => +``` + #### date_field_tag Creates a standard input field of date type. From 82551712b379455673251a060c6b090f50e04b79 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Sun, 30 Jun 2013 12:34:46 +0200 Subject: [PATCH 3/4] Complete a sentence in i18n guide's introduction Add a list of what will be covered into this guide --- guides/source/i18n.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/guides/source/i18n.md b/guides/source/i18n.md index 9e5278c92b..2af2b1e9b2 100644 --- a/guides/source/i18n.md +++ b/guides/source/i18n.md @@ -21,6 +21,11 @@ This guide will walk you through the I18n API and contains a tutorial on how to After reading this guide, you will know: +* How I18n works in Ruby on Rails +* How to correctly use I18n into a RESTful application in various ways +* How to use I18n to translate ActiveRecord errors or ActionMailer E-mail subjects +* Some other tools to go further with the translation process of your application + -------------------------------------------------------------------------------- NOTE: The Ruby I18n framework provides you with all necessary means for internationalization/localization of your Rails application. You may, however, use any of various plugins and extensions available, which add additional functionality or features. See the Rails [I18n Wiki](http://rails-i18n.org/wiki) for more information. From 9bcc2bb6fa2919bd43fa32a38c415da9023d36a8 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Tue, 2 Jul 2013 23:35:06 +0200 Subject: [PATCH 4/4] [doc] fixed printing of code samples --- guides/assets/stylesheets/print.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/assets/stylesheets/print.css b/guides/assets/stylesheets/print.css index 628da105d4..bdc8ec948d 100644 --- a/guides/assets/stylesheets/print.css +++ b/guides/assets/stylesheets/print.css @@ -36,7 +36,7 @@ hr { } h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; } -code { font:.9em "Courier New", Monaco, Courier, monospace; } +code { font:.9em "Courier New", Monaco, Courier, monospace; display:inline} img { float:left; margin:1.5em 1.5em 1.5em 0; } a img { border:none; }