[Rails] Liquid with database?

softwareengineer 99 softwareengineer99 at yahoo.com
Thu Feb 9 00:32:18 GMT 2006


Hi Rick,
  
  Thanks for your reply.
  
  I will definitely check the resource links out. 
  
  A quick question, are you using file based liquid templates or storing them in the database?
  
  Thanks
  Frank

Rick Olson <technoweenie at gmail.com> wrote:  On 2/8/06, softwareengineer 99  wrote:
> Hello,
>  Just wondering if someone here as successfully ported Liquid to use with a
> database. I would like to try it out but not sure how Liquid integrates with
> current templates.
>
>  Thanks
>  Frank

You mean the liquid template engine?  I'm not sure how others like
Stikipad or Shopify are using them, but my little blog engine Mephisto
uses liquid.

svn co http://techno-weenie.net/svn/projects/mephisto/trunk
# set up database.yml
rake install_mephisto

I don't yet ship with decent templates (mephisto is very rough and not
ready for public consumption), but here's some samples:
http://techno-weenie.net/templates.yml

Here's the liquid rendering in action:
http://collaboa.techno-weenie.net/repository/file/mephisto/trunk/app/controllers/application.rb
http://collaboa.techno-weenie.net/repository/file/mephisto/trunk/app/controllers/mephisto_controller.rb

Liquid cannot access your model's properties, so I wrote a #to_liquid
method to return a hash.

--
Rick Olson
http://techno-weenie.net
_______________________________________________
Rails mailing list
Rails at lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails


		
---------------------------------
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060209/900c1bec/attachment-0001.html


More information about the Rails mailing list