How to overcome an apparent REST vs. DRY dilemma in rails?
Posted
by Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2010-04-01T20:55:54Z
Indexed on
2010/04/01
21:13 UTC
Read the original article
Hit count: 307
A rails app I'm working on features examples of quadratic equations. Obviously, these are all of a common structure: ax^2 + bx + c = 0.
I don't want to store every single example of these. I'd rather generate them from a template. Storing hundreds of possible versions of this structure seems highly wasteful and un-DRY.
On the other hand, if I generate them, I can't access them again reliably as I could if they were simply multiple database objects.
I'm sure there must be a way to overcome this, but I'm still learning rails and I'm obviously not grasping something here. Thanks.
© Stack Overflow or respective owner