Using Rails Gems Like simple_form in Sinatra Or Anywhere

{{{ Rails comes with a massive amount of helpful gems. Those gems are part of Rails’ success and they make Rails the most versatile framework in the Ruby world. No longer shall using those gems be limited to a Rails environment! The new “Cells 3.8.5”:https://github.com/apotonick/cells allows using many gems in any project, from simple scripts… Continue reading Using Rails Gems Like simple_form in Sinatra Or Anywhere

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

Filters For Your Cells with cells-filters

{{{ There’s nothing like giving a quick update about “Cells”:https://github.com/apotonick/cells on a rainy sunday evening. Almost a year ago we were happy “to introduce state-args into Cells”:http://nicksda.apotomo.de/2011/02/cells-3-5-release-party-summary/. State-args help to prevent saving state in instance variables and instead pass variables from @#render_cell@ as arguments, making your code more explicit. One big problem was that filters… Continue reading Filters For Your Cells with cells-filters

Mounting a Cell to a Route with Cells 3.8.

{{{ Those of you “having asked for mountable cells”:https://github.com/apotonick/cells/issues/15 will be happy with the recent “3.8.0 release”:https://rubygems.org/gems/cells/versions/3.8.0! We entirely removed the ActionController dependency. That essentially means you can have cells outside of the standard Rails stack. Cool, heh? h3. Cells 3.8.0 Released Two little things in 3.8 changed. @Cell::Base@ and @Cell::Rails@ are now different classes… Continue reading Mounting a Cell to a Route with Cells 3.8.

Cells 3.7 released, taataa.

{{{ Is it a good sign when a minor release doesn’t yield any stunning new features? When there’s nothing breathtaking to talk about? I guess with Cells it is – the gem finally seems to get into what it should have been 6 years ago: a mature view components framework for Rails. The “3.7 release”:https://github.com/apotonick/cells/commit/0c0aeedd3d05de571d8265bc2d3bc2582c370a53,… Continue reading Cells 3.7 released, taataa.

Folks, here is the Cells Cheatsheet 1.0!

{{{ Why didn’t I do this earlier? “Here’s the official Cells cheatsheet”:http://cells.rubyforge.org/pdfs/cells_cheatsheet-1.0.pdf with all the information you need at hand when writing sweet view components in Rails. It discusses the following topics. * Generator * Options processing * Rendering * Control Flow & Initialization * View Inheritance & Builders * Caching * Configuration * Test::Unit… Continue reading Folks, here is the Cells Cheatsheet 1.0!