I have a Question model where the answer to the question can have
multiple db type (integer, string, boolean, …).
I’ve had a similar situation. I’d use STI to have different models for
different answer types. My repository at http://github.com/ihid/super_sti might help. Email me personally if you
want some help with that repository.
I have a Question model where the answer to the question can have
multiple db type (integer, string, boolean, …).
I’ve had a similar situation. I’d use STI to have different models for
different answer types. My repository at http://github.com/ihid/super_sti might help. Email me personally if you
want some help with that repository.
Here’s a direct and elegant solution: http://www.mongodb.org/
If rigid schema is the problem, then eliminate your dependence on a
pre-defined schema.
However, the STI solution mentioned above is probably the next best
approach.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.