README.md in so_meta-0.4 vs README.md in so_meta-0.6
- old
+ new
@@ -38,13 +38,10 @@
pages_subresource: # Controller name - Pages::SubresourceController
about: # Action name - about
title: "About | My Awesome New Rails Application"
description: "Our company will blow your mind...like really."
- iphone:
- title: "iPhone About | My Awesome New Rails Application"
-
contact:
title: "Contact %{name} | My Awesome New Rails Application" # Interpolation content from the view
# By not specifying a description for this page, it'll inherit the defaults
```
@@ -52,11 +49,11 @@
<!-- views/layouts/application.html.erb -->
<!DOCTYPE html>
<html lang="en">
<head>
- <title><%= so_meta(:title, :iphone) %></title>
+ <title><%= so_meta(:title) %></title>
<meta name="description" content="<%= so_meta(:description) %>" />
<%= csrf_meta_tags %>
</head>
<body>
</body>
@@ -69,9 +66,37 @@
<% so_meta_interpolation :title, name: "Brandon" %>
<h1>Contact</h1>
<p>Contact us now!</p>
```
+
+### Usage with scoping
+
+```Erb
+<title><%= so_meta(:title, :phone) %></title>
+```
+
+```YAML
+# config/locales/en.yml
+
+en:
+ so_meta:
+ defaults:
+ title: "My Awesome New Rails Application"
+ description: "This application will be so viral, your startup
+ friends will be JEALOUS!"
+
+ pages: # Controller name - PagesController
+ about: # Action name - about
+ title: "About | My Awesome New Rails Application"
+ description: "Our company will blow your mind...like really."
+
+ phone:
+ title: "Specific title for phone" # will choose this if the scope
+ matches
+```
+
+
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)