MustModify Blog: Recent Posts

The Somewhat-Extremely-Helpful inverse_of Option

October 04, 2012
Let's say you have the following association set up: --- class Route < ActiveRecord::Base has_many :appointments, :inverse_of => :route # long live the hash rocket! end class Appointment < ActiveRecord::Base belongs_to :route, :inverse_of => :appointments end --- the 'inverse-of' option is supposed to prevent...


Introduction to HL7 Messages for Developers

September 11, 2012
The kinds of HL7 records I will be receiving look something like this: ---hl7 MSH|^~\&|GHH LAB|ELAB-3|GHH OE|BLDG4|200202150930||ORU^R01|CNTRL-3456|P|2.4 PID|||555-44-4444||EVERYWOMAN^EVE^E^^^^L|JONES|19620320|F|||153 FERNWOOD DR.^ ...


Patterns with Valuable - the ModelSearch

August 24, 2012
I find that I write a lot of "advanced search" stuff, and that modeling an advanced search, and having that be in a separate class, is very good for my sanity. h2. DataSearch model The schema is below if you're interested. These models usually start in lib, and then move to app/search once I have four or five. ``` describe DataSearch do it...


Great Interfaces: The Scale of the Universe

February 11, 2012
http://htwins.net/scale2/ I love how much information is communicated in such a simple interface. I also like the fact that data appears when it is needed, but doesn't clutter up the screen when it is not needed.


cucumber says, "no such file to load -- spec/expectations"

September 13, 2011
Setting up a Rails3 application quickly, I ran in to this error... no such file to load -- spec/expectations easy fix... I had gem 'rspec' but needed to add gem 'rspec-rails'


Funniest irrelevant argument ever

May 22, 2011
From "Use Mercurial, you Git!":http://translated.by/you/use-mercurial-you-git/original/?show-translation-form=1 "If I'd wanted building blocks for rolling my own, I'd have gone to Home Depot and bought a 1 and a 0."


MySQL permissions for a Rails app

May 21, 2011
Here's how I typically setup my rails environments. NOTE: I don't include stored procedure or view permissions because Rails doesn't ever use those. Wouldn't it be great if Rails used views or stored procedures? Actually, I kinda like it the way it is. Stored Procedures are nice but the tradeoff, IE having business logic in the app and in the...


Capistrano says, "sh: bundle: not found"

May 12, 2011
Typically, you define your path in /etc/environment. Here's a simple example: --- PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/ruby/bin" --- That last bit tells the system where Ruby lives. If Ruby isn't in the path, you won't be able to run it or any gem scripts, like bundle. Unfortunately,...