I'm new at RoR, so please excuse me if this is a very basic question.
I've tried some googling, but haven't found an answer yet.
Is there any established, or preferred way to limit a table to have
one and only one row? I have some default values that I will use in
multiple places in my app, and I want to be able to modify them during
production, so I don't want to hard code them. So I made a "Defaults"
model. I can simply limit my code to only accessing the first row, but
it seems cleaner to me if there's someway to prevent more than one row
Is the best/easiest way just to add a validate method in the model
that checks on creating if there's already an entry in the database,
and returns an error? Or is there some simpler way I'm overlooking?
Thank you in advance!