From 460a09e44818b1fbd787585d17761b116ccfc000 Mon Sep 17 00:00:00 2001 From: RichMorin Date: Thu, 12 Aug 2010 13:45:59 -0700 Subject: [PATCH] Migrated from using-liquid-without-rails v9 --- Using-Liquid-without-Rails.textile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Using-Liquid-without-Rails.textile b/Using-Liquid-without-Rails.textile index f6fb4be..6274050 100644 --- a/Using-Liquid-without-Rails.textile +++ b/Using-Liquid-without-Rails.textile @@ -1,5 +1,9 @@ -Want to use Liquid along with some plain old Ruby code? -The secret is creating a @to_liquid@ method on any classes you create. +Want to use Liquid along with some plain old Ruby code? +First, of course, you need to tell Ruby about the Liquid library. +Assuming that you're in the @liquid@ directory, as cloned from GitHub, +just @require 'lib/liquid'@. + +The big secret, however, is creating a @to_liquid@ method for any classes you want Liquid to access. Let's say you have a Product class: