[rspec-users] RSpec makes me want to write better code

Mark Wilden mark at mwilden.com
Fri Sep 26 12:28:21 EDT 2008

On Fri, Sep 26, 2008 at 8:28 AM, Ashley Moran <ashley.moran at patchspace.co.uk
> wrote:

> One downside to STI is it forces you to leave NULL columns for attributes
> that don't exist in all models.  This is also really bad for integrity.

I think all of your comments make sense, but I did just want to call out
that "the Rails way" is not typically concerned with this sort of integrity
at the database level. It's handled in the model.

Whether that's a good or bad thing can be debated, but it does explain why
STI's drawbacks don't outweigh its strengths (primarily speed, compared to
CTI, because of the lack of joins) in the minds of true Rails believers.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080926/1eafcd88/attachment.html>

More information about the rspec-users mailing list