Migrated from using-liquid-without-rails v9

RichMorin
2010-08-12 13:45:59 -07:00
parent 592f8800c2
commit 460a09e448
+6 -2
@@ -1,5 +1,9 @@
Want to use Liquid along with some plain old Ruby code? Want to use Liquid along with some plain old Ruby code?
The secret is creating a @to_liquid@ method on any classes you create. 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: Let's say you have a Product class: