Write a small message here explaining this change. (Optional)

Updated Getting Liquid to Work in Rails (textile)
jwarchol
2011-02-24 17:38:34 -08:00
parent 59741afce0
commit 4e8e1907c8
+9 -7
@@ -10,12 +10,14 @@ A note about helpers. The liquid rails plugin tries to use your helpers as Filte
Helper:
module ApplicationHelper
def truncate(input, length)
input[0..length] + '...'
end
end
<pre><code>module ApplicationHelper
def truncate(input, length)
input[0..length] + '...'
end
end
</code></pre>
Liquid:
{{ 'This is a long section of text' | truncate: 3 }} #=> Thi...
<pre><code> {{ 'This is a long section of text' | truncate: 3 }} #=> Thi...
</code></pre>