Cowboycoded - cowboycoded.com

General Information:

Latest News:

My Journey into the world of vim (from Textmate) 7 Mar 2012 | 06:03 am

I used Textmate for almost 3 years before deciding to switch to vim.  I watched one of my coworkers use it and was impressed by the fact that his hands never had to leave the keyboard and navigating a...

Change the default shell in OSX to zsh 4 Mar 2012 | 05:18 pm

I recently started using YADR as a replacement for the janus macvim setup. They recommend switching from bash to zsh so I figured I would give it a try. It is easy to change the default shell from bas...

Patching Formtastic to append HTML to input list elements 19 Jul 2011 | 04:09 am

Formtastic is pretty killer when it comes to creating nice looking forms very quickly. I love the short syntax compared to the default Rails form helpers, but sometimes I find the black box helpers a ...

Testing Facebook authentication with Rails 3 Cucumber, Capybara, Selenium 7 May 2011 | 03:57 am

I am in the process of creating an engine that will simplify adding single signon to my app using omniauth & devise. One of the requirements is testing this with Cucumber, and it took me a little whil...

Round to half intervals (round with fractions) in Ruby 28 Apr 2011 | 07:29 am

Let’s say you need to round to half numbers in Ruby, because you are making a rating system and want to display half stars for the ratings (1, 1.5, 2, 2.5, etc..). You want the following output when y...

Add existing records to the versions table in paper_trail 20 Apr 2011 | 07:05 am

I was working with paper_trail today. It is an excellent gem that saves a history of your creates, updates, and destroys for Rails ActiveRecord models. I am adding this gem to an existing project that...

Lock down a Rails 3 app with a single password using lock 12 Apr 2011 | 07:17 am

This tutorial shows you more about the power and simplicity of Rails 3 Engines. When I release a new feature for one of my  production Rails apps (or an entirely new app) that needs to be beta tested ...

Application-wide variables for your Rails 3 app using Yettings 9 Apr 2011 | 01:54 pm

Application-wide settings for Rails apps can be very useful in many different scenarios.  For example, let’s say you want a place to store API keys for various 3rd party services used in your app.  In...

Customizing your embedded gists with CSS 9 Apr 2011 | 06:16 am

I have always been less than pleased with the way my blog looks, especially relating to the code snippets, but honestly changing the template hasn’t been that high on my priority list. I started writi...

Why you can’t reopen Rails 3 Engine classes from the parent app 1 Mar 2011 | 05:19 pm

My main frustration with Rails 3 engines is not being able to reopen a class from the parent application.  The first time I used Engines, I tried this: #authentication stuff in my engine /my_engine/...

Recently parsed news:

Recent searches: