Tag Archives: views

View Sandboxes for Rails

Designing HTML views is an iterative, interactive process by nature. And anything that slows down the iterations, slows down development. I was working on a form recently where the steps to show it went something like this: Go to the … Continue reading

Posted in Howto, Rails | Tagged , | 14 Comments

Getting Started with Erector in Rails 3

A quick guide to getting up and running with the Erector templating library. EDIT: Here’s the fork and branch I used to get it working.

Posted in Screencasts | Tagged , , , , , | 1 Comment

Object Oriented Programming Comes to Rails

decent_exposure helps you program to an interface, rather than an implementation in your Rails controllers. Sharing state via instance variables in controllers promotes close coupling with views. decent_exposure gives you a declarative manner of exposing an interface to the state … Continue reading

Posted in Rails, Rants, Ruby | Tagged , , , | 5 Comments

Counters for Partials

Sometimes I like to number rows using a counter when rendering lists of things: <% @products.each_with_index do |product, i| %> <li class=”product_<%= i %>”><%= product.name %></li> <% end %> They are handy for testing, among other things. Of course, if … Continue reading

Posted in Rails, Ruby | Tagged , , , , | 2 Comments