Gittr - gittr.com - Gittr

Latest News:

Manually Resolving a Rails Route 1 Oct 2012 | 10:02 pm

(Rails 3.1) We had a need to take a string that had a route (/accounts/1) and get back the controller it belonged to (AccountsController). The way to do that is: MyApp::Application.routes.recognize_pa...

Ruby Spreadsheet Gem Doesn’t Play Nice With BigDecimal 2 Aug 2012 | 07:55 pm

In a report I was building, we were doing all our underlying math in BigDecimal for accuracy. But when I go to spool it out to an excel export via Spreadsheet, it fails pretty miserably with very odd ...

Sinatra Cookie handling in 0.9.4 24 Sep 2009 | 03:33 am

I had an older post about cookie handling with Sinatra, and a few details are out of date.  This is a current view (as of September 2009) of how cookies work in Sinatra. First, you need to set cookie...

CouchDB Skeleton for Monk 28 Aug 2009 | 05:37 am

Monk is starting to take off, and people are already starting to make new skeletons specific for their own needs. Check out lazybones by TobyJoe for a CouchDB based skeleton. (Github)

Monk – Quickstart Sinatra Projects 21 Aug 2009 | 10:25 am

A few coworkers at Citrusbyte (@soveran, @djanowski) have been working on Monk, a new open source web framework.  At its core is Sinatra, with a set of bundled technologies to help new projects get mo...

Wrapping get, post, put, delete – Add Magic JSON Power 5 Aug 2009 | 03:55 pm

Several times recently, there have been questions in the #sinatra channel, and on the mailing list about how to automatically render JSON, or any other kind of format as the response from Sinatra. My...

Rendering different layouts with Sinatra 15 Jul 2009 | 03:38 am

I had a project recently that had a requirement of a frontend, and an admin backend. Pretty normal for an application, but of course the admin had a different layout, set of tabs, etc. I didn’t want t...

Installing Sinatra 0.10.1 15 Jul 2009 | 03:07 am

The current version of Sinatra (as of the time I write this) is version 0.10.1. The gem on rubyforge is outdated (0.9.2). To install the current gem, use the github built version:

ActiveRecord timezones without Rails 24 Jun 2009 | 02:23 am

I was using Active Record in a batch application to manipulate some data, and I needed the timezone handling built into the newer versions. But I had a hell of a time trying to figure out how to make ...

Fix for: “no such file to load — blankslate” 13 May 2009 | 05:43 am

I was getting this error, and it turns out it’s just that builder isn’t installed. sudo gem install builder, and you’re fixed.

Recently parsed news:

Recent searches: