All blog posts tagged with rails

Serialized hashes with partial_updates in Rails 2.1

June 2, 2008

In Rails 2.1, they added partial updates - which is a great idea and a long time coming. This makes ActiveRecord only updates the parts of a model that has actually changed, and also gives you the ability to see if a field (or a record) has changed since retrieving it from the database. (via mode…

Read more

Rails Deployment

January 14, 2008

There is a post on RubyInside today that spawned quite the cascade of comments on the topic of deploying rails. While a lot to wade through, there are some interesting comments buried in there. I still find it strange that everyone is clamoring for a solution, while ignoring one that exists because …

Read more

CruiseControl and custom cruise tasks running in production

September 20, 2007

I found a fun gotcha! today with CruiseControl - if you create a custom cruise task you have to set the RAILS_ENV AND ENV["RAILS_ENV"] to test.

If you do not, CruiseControl will run against your production database. Before CruiseControl invokes it's own built-in cruise task it sets the RAILS_ENV to …

Read more

Netbeans for the win!

September 7, 2007

I have been meaning to write an article about netbeans + ruby for awhile, and anyone who knows me has probably heard me talk about it - it's great, it's fast, and it actually just works. However, somebody else saved me the trouble, infrid over at http://lifeonrails.org wrote an epic post about it, …

Read more

RSpec/Rails view specs and helpers

August 21, 2007

I ran into a situation today where I had to mock out a helper method in a view spec. After a bit of poking around came across Jake Scruggs blog where he has a post titled, appropriately enough, Mocking/Stubbing partials and helper methods in RSpec view tests.

For the lazy, it's just:

@controller.tem…

Read more

RSpec on Rails rake task for Recent Specs

June 5, 2007

As our number of specs grow I started to miss the test:recent functionality, so I created a simple little rake task to make it work with RSpec. Drop this in lib/tasks, I called it spec_recent.rake.

require 'spec/rake/spectask'
# Grab recently touched specs
def recent_specs(touched_since)
  recent_sp…

Read more

Pluginizing ActionWebService to work on Edge rails

June 4, 2007

I recently updated a project at work to Edge rails to take advantage of ActiveResource - as a result, ActionWebService went away. We've known for a long time AWS was on it's way out, but I was hoping a plugin version would be created prior to it's removal - which in all fairness may still be the cas…

Read more

Enforcing spec coverage with CruiseControl, RCov, and RSpec

June 1, 2007

Now that Alex has gotten CruiseControl.rb setup setup at work, I wanted to use it to enforce good test coverage - and I wanted the output to look good doing it. Turns out this isn't that hard, but requires a few things:

Read more

CodeRay helper for Rails

May 9, 2007

While I'm using Markdown for formatting blog entries, I wanted to have some decent syntax highlighting support as well. After looking around I decided to use CodeRay. It's fast, customizable, has nice output, and is easy to extend. All I had to do to make it work with Rails was to create a helper. I…

Read more

Displaying all 9 posts

About

I'm a programmer and shutterbug living on the West Coast of Canada.

Blog Archive

Recently Heard

A Liberal Educationby New Model ArmyPlayed on 2008/07/16 at 02:35PM
The Two Sides of Monsieur Valentineby SpoonPlayed on 2008/07/16 at 02:32PM
You Weren't Thereby New Model ArmyPlayed on 2008/07/16 at 02:28PM
Powered by Viviti