README.md in title-0.0.4 vs README.md in title-0.0.5
- old
+ new
@@ -33,9 +33,22 @@
def to_s
name
end
```
+You can pass additional values to the `#title` helper, which can be referenced
+in your translations:
+
+```erb
+<title><%= title(user_name: current_user.name) %></title>
+```
+
+```yaml
+en:
+ titles:
+ application: '%{user_name} - AppName'
+```
+
## Acknowledgement
Though the idea of translating titles was arrived at seperately, [Brandon
Keepers] wrote [Abusing Rails I18N to Set Page Titles] which outlines an
extremely similar approach, and from whence came the idea of using the view