Skip to content

Commit

Permalink
Improved documents [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
kuldeepaggarwal committed Dec 14, 2013
1 parent 068237d commit e10f910
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion guides/source/3_2_release_notes.md
Expand Up @@ -238,7 +238,7 @@ Action Pack
end end
``` ```


In the example above, Posts controller will no longer automatically look up for a posts layout. If you need this functionality you could either remove `layout "application"` from `ApplicationController` or explicitly set it to `nil` in `PostsController`. In the example above, `PostsController` will no longer automatically look up for a posts layout. If you need this functionality you could either remove `layout "application"` from `ApplicationController` or explicitly set it to `nil` in `PostsController`.


* Deprecated `ActionController::UnknownAction` in favor of `AbstractController::ActionNotFound`. * Deprecated `ActionController::UnknownAction` in favor of `AbstractController::ActionNotFound`.


Expand Down
2 changes: 1 addition & 1 deletion guides/source/action_view_overview.md
Expand Up @@ -1591,7 +1591,7 @@ Localized Views


Action View has the ability render different templates depending on the current locale. Action View has the ability render different templates depending on the current locale.


For example, suppose you have a Posts controller with a show action. By default, calling this action will render `app/views/posts/show.html.erb`. But if you set `I18n.locale = :de`, then `app/views/posts/show.de.html.erb` will be rendered instead. If the localized template isn't present, the undecorated version will be used. This means you're not required to provide localized views for all cases, but they will be preferred and used if available. For example, suppose you have a `PostsController` with a show action. By default, calling this action will render `app/views/posts/show.html.erb`. But if you set `I18n.locale = :de`, then `app/views/posts/show.de.html.erb` will be rendered instead. If the localized template isn't present, the undecorated version will be used. This means you're not required to provide localized views for all cases, but they will be preferred and used if available.


You can use the same technique to localize the rescue files in your public directory. For example, setting `I18n.locale = :de` and creating `public/500.de.html` and `public/404.de.html` would allow you to have localized rescue pages. You can use the same technique to localize the rescue files in your public directory. For example, setting `I18n.locale = :de` and creating `public/500.de.html` and `public/404.de.html` would allow you to have localized rescue pages.


Expand Down
2 changes: 1 addition & 1 deletion guides/source/form_helpers.md
Expand Up @@ -342,7 +342,7 @@ If you have created namespaced routes, `form_for` has a nifty shorthand for that
form_for [:admin, @article] form_for [:admin, @article]
``` ```


will create a form that submits to the articles controller inside the admin namespace (submitting to `admin_article_path(@article)` in the case of an update). If you have several levels of namespacing then the syntax is similar: will create a form that submits to the `ArticlesController` inside the admin namespace (submitting to `admin_article_path(@article)` in the case of an update). If you have several levels of namespacing then the syntax is similar:


```ruby ```ruby
form_for [:admin, :management, @article] form_for [:admin, :management, @article]
Expand Down
2 changes: 1 addition & 1 deletion guides/source/layouts_and_rendering.md
Expand Up @@ -404,7 +404,7 @@ class ProductsController < ApplicationController
end end
``` ```


With this declaration, all of the views rendered by the products controller will use `app/views/layouts/inventory.html.erb` as their layout. With this declaration, all of the views rendered by the `ProductsController` will use `app/views/layouts/inventory.html.erb` as their layout.


To assign a specific layout for the entire application, use a `layout` declaration in your `ApplicationController` class: To assign a specific layout for the entire application, use a `layout` declaration in your `ApplicationController` class:


Expand Down

0 comments on commit e10f910

Please sign in to comment.