README.rdoc in lwe-page_title_helper-0.5.0 vs README.rdoc in lwe-page_title_helper-0.6.1

- old
+ new

@@ -1,9 +1,9 @@ = Page title helper Ever wondered if there was an easier and DRY-way to set your page titles (and/or headings). Backed -byRails (>= 2.3) new support for <i>I18n</i> the solution is a simple helper method. +by Rails (only tested on 2.3.x) and it's new <tt>I18n</tt>-class the solution is a simple helper method. In your layout add this to your <tt><head>-section</tt>: ... <title><%=h page_title %></title> @@ -96,12 +96,15 @@ Note, currently it only makes sense to set <tt>:format</tt> and/or <tt>:default</tt> globally. == Some (maybe useful) interpolations - # internationalized controller names, with fallback +The internationalized controller name, with fallback to just display the humanized name: + PageTitleHelper.interpolates :controller do |env| I18n.t env.controller.controller_path.tr('/','.') + '.controller', :default => env.controller.controller_name.humanize end + +<b>Note:</b> Where should I put these, as well as the default options? I'd put them in a new file at <tt>config/initializers/page_title.rb</tt> or someting like that. == Licence and copyright Copyright (c) 2009 Lukas Westermann (Zurich, Switzerland), released under the MIT license