Skip to content
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

Closed

Conversation

georgebrock
Copy link
Contributor

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.

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.
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling b34c983 on georgebrock:gb-pass-context-to-helper into 6207192 on calebthompson:master.

@georgebrock
Copy link
Contributor Author

@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?

@calebhearth
Copy link
Owner

That of the surrounding code, please.

```yaml
en:
titles:
application: 'AppName - %{user_name}'
Copy link
Owner

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing. Done.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling da65961 on georgebrock:gb-pass-context-to-helper into 6207192 on calebthompson:master.

@calebhearth
Copy link
Owner

Thanks! 2175dd4

@calebhearth calebhearth closed this Jul 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants