
Here’s something I haven’t done in a while — a genuine code blog entry. I needed to add a simple CSV file output, here’s how I did it, tests and all. I used two gems, FasterCSV, which I assume that most of you are familiar with, and Comma, which is a nice little DSL...
Read more »
Tags: code, rails
Posted in Publishers, Rails Prescriptions | View Comments

Recently, Carlos, suggested that I should start sharing some basic SQL tips that help with performance and/or general usage. I recently came across some code that I didn’t like to read and/or write. For example, let’s take the following…
SELECT * FROM brochures WHERE published_at <= now() AND archived_at >= now()
Essentially, this is pulling...
Read more »
Tags: code, development, mysql, postgresql, Programming, refactoring, sql
Posted in Publishers, Robby on Rails | View Comments

While our team is typically focused on larger client and internal projects, we do get an opportunity to assist businesses on a much smaller scale. Whether this be through retainer-based consulting or through code audits, we have seen a lot of Ruby on Rails code over what has nearly been… five years!? We’ve been...
Read more »
Tags: agile, audit, Business, code, codeaudit, PLANET ARGON, planetargon, Programming, ruby, Ruby on Rails
Posted in Publishers, Robby on Rails | View Comments

We’ve been doing some early (or late… if you’re a half-full kind of person) spring cleaning on some of our projects. One of the small projects, flash_message_conductor, which we released last year as a plugin is now a gem. We’ve been moving away from using plugins in favor of gems as...
Read more »
Tags: code, development, gem, github, PLANET ARGON, plugins, Ruby on Rails, rubyonrails
Posted in Publishers, Robby on Rails | View Comments

Yesterday, the Rails team released 2.3.4, which includes standardized way for loading seed data into your application so that you didn’t have to clutter your database migrations.
I noticed a few comments on some blogs where people were asking how to use this new feature, so here is a quick runthrough a few ways that...
Read more »
Tags: code, database, development, faker, github, PLANET ARGON, Programming, ruby, Ruby on Rails, rubyonrails, seeds, workflow
Posted in Publishers, Robby on Rails | View Comments

On one of our larger client projects (approx. 160 models and growing…) we have a specific model that we refer to quite a bit throughout our code. This model contains less than 10 records, but each of them sits on top of an insanely large and complex set of data. Each record refers to...
Read more »
Tags: activerecord, businesslogic, code, development, model, Programming, ruby, Ruby on Rails, rubyonrails
Posted in Publishers, Robby on Rails | View Comments

DHH recently posted, How to do Basecamp-style subdomains in Rails on SvN and it just happens that I was implementing some similar stuff this last week for a project we’re developing internally.
In our project, not everything needs to be scoped per-account as we are building a namespace for administrators of the application...
Read more »
Tags: accounts, code, database, development, example, Programming, Ruby on Rails, rubyonrails, subdomains, tutorial
Posted in Publishers, Robby on Rails | View Comments

After releasing the new RubyURL API, I decided that it was time to look around at libraries to interact with it. I came across a new Ruby gem from John Nunemaker named, HTTParty, which aims to make it easy to talk to XML and JSON-based web services. Be sure...
Read more »
Tags: api, code, development, gem, http, httparty, json, Programming, REST, rubygems, RubyURL, tutorial, xml
Posted in Publishers, Robby on Rails | View Comments

Our team has been working our way into the Git world. One of our big client projects is now 100% git while the other is still on Subversion for another month or so. (I’m getting by with git-svn, the gateway drug on that). We’ve had pretty much nothing but success with Git for...
Read more »
Tags: code, control, git, lesson, Programming, source
Posted in Publishers, Robby on Rails | View Comments

I was going through an older project of ours and cleaning up some specs and noticed how often we were doing the same thing in several places. When we started the project, we didn’t get the benefits of shared groups. Now that we have some time to go through and update some of our...
Read more »
Tags: agile, code, controllers, development, Programming, rails, rspec, Ruby on Rails, rubyonrails, specs, tutorial
Posted in Publishers, Robby on Rails | View Comments