Monthly Archives: March 2009

Quick Hits: Setting the User Agent Header in Webrat

If you’ve read the new PragProg beta e-book on RSpec, you may have read that you can set HTTP headers for your Webrat request like so: Given /^I am browsing the site using Safari$/ do header "User-Agent" , "Mozilla/5.0 (Macintosh; … Continue reading

Share
Posted in Rails, ruby, Testing | Tagged , , , , | 1 Comment

FasterCSV and noob-ish silliness

Here are two things I discovered this weekend: Thing 1: FasterCSV is really cool!  It’s easy to use and does exactly what it should.  Here’s Scott Becker’s exporting tutorial.  For importing, i’ve hacked together bits from Peter Larkmund’s travels and … Continue reading

Share
Posted in Programming, Quick Hits, Rails | Tagged , | Leave a comment

F@#$ing get V1 out

I’m not new to software development, but unlike Gabe and Brad I’m new to hacking rails.  I’ve created simple tutorial apps in rails (an online store, a blog, etc.) and I now feel comfortable enough to  create something for the … Continue reading

Share
Posted in Programming, Rails | Tagged | Leave a comment

Ruby/Hadoop talk on Tuesday

A note for interested parties: I (Brad) will be giving a short (10-15 minute) talk on using Ruby with Hadoop for distributed computing. The plan is to give an ultra-brief description of the MapReduce algorithm and Hadoop, show 2 examples … Continue reading

Share
Posted in Events, hadoop, ruby | Comments Off

Using assert_select to find an attribute that has square brackets in the value

Problem: assert_select ‘input[name=model_name[field_name]]’ gives ArgumentError: Invalid selector: ] Solution: assert_select ‘input[name=?]‘, ‘model_name[field_name]‘ Thanks to the Boston Ruby Group thread for the answer. Bonus: Here’s a helpful assert_select cheat sheet.

Share
Posted in Rails, Testing | Tagged , | Comments Off

InvalidAuthenticityToken, Forms, Tables, and Rails

Recently, while pairing with Abel as we hacked on some code for his budget tracking app, we came across an interesting problem while trying to acomplish what seems like a pretty straightforward task.

Share
Posted in HTML, Rails | Tagged , , | 4 Comments