From a5656ce865d7be01576113193fd290324edf569b Mon Sep 17 00:00:00 2001 From: Mauro George Date: Wed, 3 Dec 2014 18:05:24 -0200 Subject: [PATCH] Add on README info about I18n on simple_fields_for [ci skip] --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 1f47e477..21687e3b 100644 --- a/README.md +++ b/README.md @@ -789,6 +789,22 @@ object itself. Thus, similarly, if a form for an `Admin::User` object is defined `simple_form_for @admin_user, as: :some_user`, **Simple Form** will look for translations under `some_user` instead of `admin_user`. +When translate `simple_fields_for` attributes be sure to use the same name you pass to it, e.g. `simple_fields_for :posts` should be placed under `posts` not `post`: + +```yaml +en: + simple_form: + labels: + posts: + title: 'Post title' + hints: + posts: + title: 'A good title' + placeholders: + posts: + title: 'Once upon a time...' +``` + ## Configuration **Simple Form** has several configuration options. You can read and change them in the initializer