petehamilton / citier

CITIER (Class Inheritance & Table Inheritance Embeddings for Rails) is a solution for simple Multiple Class Inheritance in Rails.
88 stars 24 forks source link

Test parent.id on save, not the result of save itself. Safer. #4

Open petehamilton opened 13 years ago

petehamilton commented 13 years ago

Safer to test for parent.id.blank? rather than assume save() will return false on failure--with some NOSQL dbs, save returns a non-false failure value.

-- Thanks to 'openassist'