From 4e8e1907c8cdb4dc13e2210a71df3bd944874b23 Mon Sep 17 00:00:00 2001 From: jwarchol Date: Thu, 24 Feb 2011 17:38:34 -0800 Subject: [PATCH] Write a small message here explaining this change. (Optional) Updated Getting Liquid to Work in Rails (textile) --- Getting-Liquid-to-Work-in-Rails.textile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Getting-Liquid-to-Work-in-Rails.textile b/Getting-Liquid-to-Work-in-Rails.textile index d3ab96e..05e7b8a 100644 --- a/Getting-Liquid-to-Work-in-Rails.textile +++ b/Getting-Liquid-to-Work-in-Rails.textile @@ -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 +
module ApplicationHelper
+  def truncate(input, length)
+    input[0..length] + '...' 
+  end
+end
+
Liquid: - - {{ 'This is a long section of text' | truncate: 3 }} #=> Thi... \ No newline at end of file + +
    {{ 'This is a long section of text' | truncate: 3 }} #=>   Thi... 
+
\ No newline at end of file