I'm having an awful time trying to understand what my validation method is having trouble with.
I installed shoulda and when I tried to use it it errors out with a strange undefined method NoMethodError: undefined method '[]' for false:FalseClass
which is very odd.
I narrowed it down to this piece of offending code:
validates_each :name do |record, attr, value|
name_hash = self.parse_name(value)
record.errors.add attr, 'must have a first and last name' if
( name_hash[:first_name].nil? || name_hash[:last_name].nil? )
end
You can see the full error, offending model (simplified), the test case, and environment info at gist-596202
Any insight would be greatly appreciated.