Slick! Murdock approves!
Patrick Crowley wrote:
Oooh. If you shorten the helper name to "t", you get some nice
syntactic sugar.
## helpers/application_helper.rb
def t(title)
@title = title
return @title
end
## site/getting_started.rhtml
<h1><%=t "Getting started" %></h1>
<title>chumby</title>
I like this approach because it mimics the html safe method(#h). And,
if you've got designers or other folk editing templates, it's easily
explained.
Mr. T says, "Use my method, fool!"
-- Patrick
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby