From 7d2ae1328cf34873e4d73c3cb6fae750b3b7e213 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 4 Nov 2015 13:03:41 +0100 Subject: document the evented file system monitor opt-in in the config guide [ci skip] --- guides/source/configuring.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'guides') diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 28388e4957..3bb056493e 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -1149,3 +1149,25 @@ Disallow: / To block just specific pages, it's necessary to use a more complex syntax. Learn it on the [official documentation](http://www.robotstxt.org/robotstxt.html). + +Evented File System Monitor +--------------------------- + +If the [listen gem](https://github.com/guard/listen) is loaded Rails uses an +evented file system monitor to detect changes when `config.cache_classes` is +false: + +```ruby +group :development do + gem 'listen' +end +``` + +Otherwise, in every request Rails walks the application tree to check if +anything has changed. + +On Linux and Mac OS X no additional gems are needed, but some are required +[for *BSD](https://github.com/guard/listen#on-bsd) and +[for Windows](https://github.com/guard/listen#on-windows). + +Note that [some setups are unsupported](https://github.com/guard/listen#issues--limitations). -- cgit v1.2.3 From d47b98226827e52bc182b6b22b50a1834b45e7e4 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 4 Nov 2015 15:57:31 +0100 Subject: upgrade listen to 3.0.4 3.0.3 has a bug in OS X. --- guides/source/configuring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides') diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 3bb056493e..ee3f742367 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -1159,7 +1159,7 @@ false: ```ruby group :development do - gem 'listen' + gem 'listen', '~> 3.0.4' end ``` -- cgit v1.2.3 From 8c9e95f97056dc91d198a5974431e4d5b8be325e Mon Sep 17 00:00:00 2001 From: James Coleman Date: Mon, 2 Nov 2015 08:45:28 -0500 Subject: Clarify i18n active[model/record] key differences I spent a decent amount of time the other day trying to figure out why my active model including class wasn't generating the properly localized validation messages, and a note like this would have saved me a lot of time. --- guides/source/i18n.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'guides') diff --git a/guides/source/i18n.md b/guides/source/i18n.md index 87d2fafaf3..8381636196 100644 --- a/guides/source/i18n.md +++ b/guides/source/i18n.md @@ -805,6 +805,8 @@ en: Then `User.human_attribute_name("gender.female")` will return "Female". +NOTE: If you are using a class which includes `ActiveModel` and does not inherit from `ActiveRecord::Base`, replace `activerecord` with `activemodel` in the above key paths. + #### Error Message Scopes Active Record validation error messages can also be translated easily. Active Record gives you a couple of namespaces where you can place your message translations in order to provide different messages and translation for certain models, attributes, and/or validations. It also transparently takes single table inheritance into account. -- cgit v1.2.3