From 06c88f675290e462993c016fa38ec97361b05734 Mon Sep 17 00:00:00 2001 From: Aaron A <_aaron@tutanota.com> Date: Sun, 24 Nov 2019 20:44:04 -0800 Subject: [PATCH 1/4] Added documentation for customizing the resend confirmation instructions. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f697ffa8..e5fe8992 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,10 @@ so if you want to change them, place yours on the same dir structure on your Rai The main reason for this difference is just to make it easier to have both Standard `Devise` and this gem running at the same time. Check [these files](app/views/graphql_devise/mailer) to see the available helper methods you can use in your views. +#### Locale customization +For your convenience, the `graphql_devise.confirmations.send_instructions` locale supports the `%{email}` vairable in case you would +like to include it in the resend confirmation intructions for the user. + ### Authenticating Controller Actions Just like with Devise or DTA, you will need to authenticate users in your controllers. For this you need to call `authenticate_!` in a before_action hook of your controller. From f55806aefb6e8e21bc619c96ce0b37f24c7bb9e1 Mon Sep 17 00:00:00 2001 From: Aaron A <_aaron@tutanota.com> Date: Sun, 24 Nov 2019 21:38:41 -0800 Subject: [PATCH 2/4] Fixed a spelling error. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e5fe8992..a05d41d6 100644 --- a/README.md +++ b/README.md @@ -137,8 +137,8 @@ The main reason for this difference is just to make it easier to have both Stand Check [these files](app/views/graphql_devise/mailer) to see the available helper methods you can use in your views. #### Locale customization -For your convenience, the `graphql_devise.confirmations.send_instructions` locale supports the `%{email}` vairable in case you would -like to include it in the resend confirmation intructions for the user. +For your convenience, the `graphql_devise.confirmations.send_instructions` locale setting supports the `%{email}` variable in case +you would like to include it in the resend confirmation intructions for the user. ### Authenticating Controller Actions Just like with Devise or DTA, you will need to authenticate users in your controllers. From 5dc146bb8ce09488e5087537f1ee47944fd40c75 Mon Sep 17 00:00:00 2001 From: Aaron A <_aaron@tutanota.com> Date: Sun, 24 Nov 2019 22:17:40 -0800 Subject: [PATCH 3/4] Fixed misspelling. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a05d41d6..e2aba71c 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ Check [these files](app/views/graphql_devise/mailer) to see the available helper #### Locale customization For your convenience, the `graphql_devise.confirmations.send_instructions` locale setting supports the `%{email}` variable in case -you would like to include it in the resend confirmation intructions for the user. +you would like to include it in the resend confirmation instructions for the user. ### Authenticating Controller Actions Just like with Devise or DTA, you will need to authenticate users in your controllers. From 9ec23489e033dc9e20c3837a09c38f46876e31ce Mon Sep 17 00:00:00 2001 From: Aaron A <_aaron@tutanota.com> Date: Wed, 8 Jan 2020 15:37:59 -0800 Subject: [PATCH 4/4] Created seperate I18n documentation section for localization. --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e2aba71c..aae62a79 100644 --- a/README.md +++ b/README.md @@ -136,9 +136,10 @@ so if you want to change them, place yours on the same dir structure on your Rai The main reason for this difference is just to make it easier to have both Standard `Devise` and this gem running at the same time. Check [these files](app/views/graphql_devise/mailer) to see the available helper methods you can use in your views. -#### Locale customization -For your convenience, the `graphql_devise.confirmations.send_instructions` locale setting supports the `%{email}` variable in case -you would like to include it in the resend confirmation instructions for the user. +### I18n +GraphQL Devise supports locales. For example, the `graphql_devise.confirmations.send_instructions` locale setting supports the `%{email}` variable in case you would like to include it in the resend confirmation instructions for the user. Take a look at our [locale file](https://github.com/graphql-devise/graphql_devise/blob/master/config/locales/en.yml) to see all of the available messages. + +Keep in mind that if your app uses multiple locales, you should set the `I18n.locale` accordingly. You can learn how to do this [here](https://guides.rubyonrails.org/i18n.html). ### Authenticating Controller Actions Just like with Devise or DTA, you will need to authenticate users in your controllers.