From 9e928736dcd02e1c896e17e19f578b889f0ca53c Mon Sep 17 00:00:00 2001 From: nicholaides Date: Thu, 12 Aug 2010 13:45:56 -0700 Subject: [PATCH] Migrated from trying-to-understand-drops v8 --- Trying-to-Understand-Drops.textile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Trying-to-Understand-Drops.textile b/Trying-to-Understand-Drops.textile index 03cda30..7619899 100644 --- a/Trying-to-Understand-Drops.textile +++ b/Trying-to-Understand-Drops.textile @@ -5,9 +5,11 @@ Perhaps someone can comment on what the different drops are doing and their purp Here are the 'drops' +

   class UserDrop < BaseDrop
     liquid_attributes << :login << :email
   end
+
Explanation of above code
Liquid accepts only a limited number of objects types i.e. Strings, Arrays, Hashes, Numerics, and Booleans. If we want to pass our Active Record object to liquid templates we have to define that logic explicitly(Liquid doesn't provide that functionality).