Cells-Hamlit: The Fastest View Engine Around.

The Hamlit gem is a reimplementation of the popular Haml markup language, which unfortunately is based on a quite old, convoluted codebase. Hamlit borrows the syntax, but rewrites the entire engine code leveraging the excellent Temple gem, which is a parser, compiler and optimizer for template languages and is also used in Slim. Wow, that’s… Continue reading Cells-Hamlit: The Fastest View Engine Around.

MiniTest::Spec, Capybara, Rails Integration Tests, and Cells: It Works!

I had a hard time getting MiniTest::Spec working with Capybara matchers, in combination with Rails integration tests and cells tests. I almost switched to Rspec but then finally figured out how simple it is. Why People Use Rspec. The reason people use Rspec is: It works. Everything popular is supported out-of-the-box provided by the hard… Continue reading MiniTest::Spec, Capybara, Rails Integration Tests, and Cells: It Works!

Caching In Cells: API Change In 3.10.

{{{ The caching layer in “Cells”:https://github.com/apotonick/cells just got an update. By using the new “uber”:https://github.com/apotonick/uber#dynamic-options gem we could generalize the processing of options resulting in a more streamlined experience for you. h3. What Changed? For those of you already using Cells’ caching, *please update your code when updating to 3.10!* Blocks do not receive the… Continue reading Caching In Cells: API Change In 3.10.

New Experimental Feature in Cells: View Models

{{{ The “cells”:https://github.com/apotonick/cells gem has been around for almost 7 years now. With more than 300.000 “downloads”:https://rubygems.org/gems/cells within 3 years it has gained some traction in the Rails community. Many projects are using it heavily to write reusable widgets, testable partials or just to have well-encapsulated view components. We felt it was time to breath… Continue reading New Experimental Feature in Cells: View Models

Cells Got content_for Support.

{{{ After decades of struggling with myself, and after a fantastic “RubyConf Australia”:http://www.rubyconf.org.au/ with lots of love I finally managed to give cells users support for a global (brrr) @#content_for@ helper. h3. Using It. The new helper is added by including the “cells-capture”:https://github.com/apotonick/cells-capture gem into your @Gemfile@. gem ‘cells-capture’ Cells need to declare explicitly that… Continue reading Cells Got content_for Support.

Maximum Modularity with Cells and Rails Engines

{{{ Do you remember “when we were writing a reusable sidebar element”:http://nicksda.apotomo.de/2010/11/lets-write-a-reusable-sidebar-component-in-rails-3/ some time ago? The sidebar used in many controllers was implemented using a “cell”:https://github.com/apotonick/cells which encapsulated both assets and code in one place. Those were good times. When needed, we could render the box with a @render_cell@ call anywhere in our app. #sidebar… Continue reading Maximum Modularity with Cells and Rails Engines