diff options
-rw-r--r-- | guides/source/action_view_overview.md | 17 | ||||
-rw-r--r-- | guides/source/active_support_instrumentation.md | 8 | ||||
-rw-r--r-- | guides/source/command_line.md | 6 | ||||
-rw-r--r-- | guides/source/getting_started.md | 2 |
4 files changed, 28 insertions, 5 deletions
diff --git a/guides/source/action_view_overview.md b/guides/source/action_view_overview.md index dea1ddef71..57a157389d 100644 --- a/guides/source/action_view_overview.md +++ b/guides/source/action_view_overview.md @@ -1230,6 +1230,14 @@ Return select and option tags for the given object and method, using `time_zone_ time_zone_select( "user", "time_zone") ``` +#### date_field + +Returns an input tag of the "date" type tailored for accessing a specified attribute. + +```ruby +date_field("user", "dob") +``` + ### FormTagHelper Provides a number of methods for creating form tags that doesn't rely on an Active Record object assigned to the template like FormHelper does. Instead, you provide the names and values manually. @@ -1364,6 +1372,15 @@ text_field_tag 'name' # => <input id="name" name="name" type="text" /> ``` +#### date_field_tag + +Creates a standard input field of date type. + +```ruby +date_field_tag "dob" +# => <input id="dob" name="dob" type="date" /> +``` + ### JavaScriptHelper Provides functionality for working with JavaScript in your views. diff --git a/guides/source/active_support_instrumentation.md b/guides/source/active_support_instrumentation.md index 38dbfd3152..969596f470 100644 --- a/guides/source/active_support_instrumentation.md +++ b/guides/source/active_support_instrumentation.md @@ -39,7 +39,7 @@ Action Controller ```ruby { - key: 'posts/1-dasboard-view' + key: 'posts/1-dashboard-view' } ``` @@ -51,7 +51,7 @@ Action Controller ```ruby { - key: 'posts/1-dasboard-view' + key: 'posts/1-dashboard-view' } ``` @@ -63,7 +63,7 @@ Action Controller ```ruby { - key: 'posts/1-dasboard-view' + key: 'posts/1-dashboard-view' } ``` @@ -75,7 +75,7 @@ Action Controller ```ruby { - key: 'posts/1-dasboard-view' + key: 'posts/1-dashboard-view' } ``` diff --git a/guides/source/command_line.md b/guides/source/command_line.md index a0255f3de2..ec3ba9d704 100644 --- a/guides/source/command_line.md +++ b/guides/source/command_line.md @@ -27,6 +27,8 @@ There are a few commands that are absolutely critical to your everyday usage of * `rails dbconsole` * `rails new app_name` +All commands can run with ```-h or --help``` to list more information. + Let's create a simple Rails application to step through each of these commands in context. ### `rails new` @@ -348,6 +350,9 @@ Rake is Ruby Make, a standalone Ruby utility that replaces the Unix utility 'mak You can get a list of Rake tasks available to you, which will often depend on your current directory, by typing `rake --tasks`. Each task has a description, and should help you find the thing you need. +To get the full backtrace for running rake task you can pass the option +```--trace``` to command line, for example ```rake db:create --trace```. + ```bash $ rake --tasks rake about # List versions of all Rails frameworks and the environment @@ -361,6 +366,7 @@ rake middleware # Prints out your Rack middleware stack rake tmp:clear # Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear) rake tmp:create # Creates tmp directories for sessions, cache, sockets, and pids ``` +INFO: You can also use ```rake -T``` to get the list of tasks. ### `about` diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 2fb0cd7c72..393ed671b0 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -1662,7 +1662,7 @@ Two very common sources of data that are not UTF-8: in the browser. This also applies to your i18n translation files. Most editors that do not already default to UTF-8 (such as some versions of Dreamweaver) offer a way to change the default to UTF-8. Do so. -* Your database. Rails defaults to converting data from your database into UTF-8 at +* Your database: Rails defaults to converting data from your database into UTF-8 at the boundary. However, if your database is not using UTF-8 internally, it may not be able to store all characters that your users enter. For instance, if your database is using Latin-1 internally, and your user enters a Russian, Hebrew, or Japanese |