July 2011
1 post
Eye Street: :accepts_nested_attributes_for with... →
A recent post that I wrote for work: Wheew… what a title… kinda dry, very geeky, but if you landed here, hopefully this will help. This blog documents some of the code wrangling that we did for a recent app, VRCompliance. I needed to have the ability to create multiple phone numbers when inputting either addresses or people in our…
Jul 7th
1 note
April 2011
1 post
Emacs Configuration
I’ve had my emacs configuration under version control for the better part of the last decade, cvs then svn, and for the last 3 years git. I finally bit the bullet, and purged it of private data. Since I doubt the history is that interesting to most people, I kept a local historical branch, and then truncated the master branch which is now available in my github repos. I used to use a...
Apr 20th
December 2010
1 post
2 tags
Forcing :before_validations to run and save the...
I meant to write this up awhile ago, but just want to get it out… Have you ever decided to massage incoming data in a :before_validation. I ran into an issue recently where I added a change to a before_validation to remove extraneous characters from phone numbers. I already had a ton of numbers in the system, so I thought I would then be able to just iteration through the list of phone...
Dec 17th
July 2009
1 post
Shoulda Snippets For Emacs
I have just updated my Shoulda snippets for the Emacs YASnippets templating package. Shoulda is a ruby-based testing framework that consists of test macros, assertions, and helpers added on to the Test::Unit ruby framework. The snippets are based, and in many cases copied from the TextMate Shoulda snippet bundle, and modified where needed to work with the YASnippets package. New features in the...
Jul 28th
February 2009
1 post
4 tags
Better Oracle Support For db:structure:dump
If you have tried $ rake db:structure:dump in a rails app when using Oracle as your database, then you have probably been slightly disappointed. The same rake task for MySQL and Postgres dumps everything you need to recreate the database. The task for Oracle only dumps SQL for the table creation (no constraints), and for the sequences. The...
Feb 23rd
January 2009
1 post
4 tags
active_record_oracle_extensions Plugin
The “active_record_oracle_extensions plugin”:http://github.com/eyestreet/active_record_oracle_extensions/tree/master provides support for adding foreign keys to migrations, adding synonyms to migrations, and disabling foreign key constraints during fixture loading. These are features that I needed in my applications, but either did not exist in other plugins, or the plugins seem to...
Jan 2nd