1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fix ApplicationController path on Action View guides

Since Rails 2.3, the ApplicationController path is
app/controllers/application_controller.rb, as stated on
its release notes:
https://guides.rubyonrails.org/2_3_release_notes.html#application-controller-renamed
This commit is contained in:
Neil 2022-01-08 16:19:01 -03:00
parent 1d665e13a2
commit ee9a77150c

View file

@ -423,7 +423,7 @@ For example, suppose you have an `ArticlesController` with a show action. By def
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.
Since Rails doesn't restrict the symbols that you use to set I18n.locale, you can leverage this system to display different content depending on anything you like. For example, suppose you have some "expert" users that should see different pages from "normal" users. You could add the following to `app/controllers/application.rb`:
Since Rails doesn't restrict the symbols that you use to set I18n.locale, you can leverage this system to display different content depending on anything you like. For example, suppose you have some "expert" users that should see different pages from "normal" users. You could add the following to `app/controllers/application_controller.rb`:
```ruby
before_action :set_expert_locale