Using Formtastic to Cleanly Create Nice Looking Forms in Rails
Forms can easily get cluttered when you're dealing with a lot of form fields... er, ERB tags. I've written about extending Rails form builders, which certainly goes along way to shrinking your views where forms are used. The plugin Formtastic is even bett...
Written by Sean Behan on 06/17/2012
How To Remove Duplicates From a Table with Postgres
Let's create a table that will hold some dummy data.
> create table fruits (id serial primary key, name varchar, color varchar);
> insert into fruits (name, color) values ('apple', 'red');
> insert into fruits (name, color) values ('ap...
Written by Sean Behan on 10/08/2013
Carrier Email Addresses for Sending SMS over Email
Just for reference, here are the carrier email addresses for sending email as an SMS. Look up the carrier for the phone in question, then send an email in this format [telephonenumber]@[carrier-name.com]
Carrier Email to SMS Gateway
Alltel [10-digit p...
Written by Sean Behan on 06/17/2012
Very Simple Breadcrumb Navigation in Rails with Before_filter
This may not be the ideal solution. This just manages request.referers in a session variable, then looping over each unique path prints a link to the screen. It's more of a "history" than a hierarchy for resources in an application. It is however, pretty ...
Written by Sean Behan on 06/17/2012
Installing Monk on Ubuntu with Ruby Gems
Installing monk like this will fail
gem install monk
You'll need to install the wycats-thor gem first with this command
gem install wycats-thor -s http://gems.github.com
Written by Sean Behan on 06/17/2012