-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass additional context to TitleHelper#title #3
Pass additional context to TitleHelper#title #3
Conversation
The helper previously passed the view assigns to the PageTitle to be used in internationalised strings. This commit allows the caller to pass a Hash which will be merged into the view assigns, making it possible to use additional values in page titles.
@calebthompson Using single quotes seems to be consistent with the surrounding code. Would you prefer that I follow the style of the code, or the recently amended thoughtbot style guide? |
That of the surrounding code, please. |
```yaml | ||
en: | ||
titles: | ||
application: 'AppName - %{user_name}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a couple of reasons I am of the opinion that it is better to put an app name after variable content in a page title. Would you mind swapping these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. Done.
Thanks! 2175dd4 |
The helper previously passed the view assigns to the PageTitle to be used in internationalised strings. This PR allows the caller to pass a Hash which will be merged into the view assigns, making it possible to use additional values in page titles.