Export to GitHub

ruby-sequel - issue #287

Patch for Single Table inheritance failure if the designated sti_key field value is blank


Posted on Feb 27, 2010 by Happy Kangaroo

If the designated sti_key field is blank, an exception is raised:

NoMethodError: private method `load' called for Object:Class

because a call to constantize(nil) returns Object.

Attached is a fix.

Attachments

Comment #1

Posted on Feb 27, 2010 by Happy Bear

Fix looks good. I'll merge and test it on Monday.

Comment #2

Posted on Mar 1, 2010 by Happy Bear

Fixed: http://github.com/jeremyevans/sequel/commit/957d37e87a6379eb20f6559c79add6f2207ddbdd

Status: Fixed