Tag Archives: rails

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

Rack-Test and Capybara are uneasy bedfellows

I’m using Capybara on a new project because apparently it’s the new hotness. Today I found out that all is not peaceful in the Cucumber/Capybara/Rack-Test stack. There is a cold war going on, and both Capy and Rack-test are jealously … Continue reading

Posted in Uncategorized | Tagged , , , , , | 3 Comments

Rails 3 resource routes with dots; or, how to make a Ruby developer go a little bit insane

This one cost me at least an hour of frustration. So apparently the Rails router has considered the dot (“.”) to be a “separator” character along with the slash (“/”) since version 1.2. I don’t know in what context this … Continue reading

Posted in Uncategorized | Tagged , , , , , , | 9 Comments

The Trifecta of FAIL; or, how to patch Rails 2.0 for Ruby 1.8.7

It’s an oft-stated fact that most disasters result not from a single point of failure but from a combination of failures reinforcing each other. I wouldn’t term the problem I ran into last Friday a disaster, but it certainly cost … Continue reading

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

Revision-Stamp Your Rails Apps

One of my biggest pet peeves in doing QA is when I spend half a day trying to track down why a bug I thought I’d fixed has cropped up again, only to discover that the reporter was looking at … Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments

Monkeypatching is Destroying Ruby

(The title of this post is intended to be deliberately provocative, as well as being a nod to Steven Colbert’s “The People Destroying America” segments. It’s provocative because I want to get people talking about this issue.  I don’t actually … Continue reading

Posted in Uncategorized | Tagged , , , , , | 46 Comments

Announcing NullDB 0.0.1

I spent the afternoon coding an alternative to the ARBS and UnitRecord database-elimination plugins.  Definitely scratching a personal itch, as I had a project where I wanted to use one of the above-mentioned libraries but i just couldn’t seem to … Continue reading

Posted in Uncategorized | Tagged , , , , , | Leave a comment