Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Suggestion: clarify "the database" #8

Closed
jaylevitt opened this Issue Dec 1, 2011 · 4 comments

Comments

Projects
None yet
2 participants

The README mentions storing settings in "the database". I quickly realized that this is a fake ActiveRecord object that serializes back to config.yml. I see the advantages - simple and easy to edit, lets you make changes at dev-time without a migration - but it means you can't use this if you run multiple application servers, since they won't share the same database.

Might want to clarify that in the README.

Owner

paulca commented Dec 1, 2011

I'm not sure I understand the multiple application servers issue ... why wouldn't they share the same database? If you mean an app that connects to a slave database, then writes to the master should replicate back to that, no?

Also ... Configurable is a real ActiveRecord object ... there's nothing fake about it, it just has methods added to access variables in a key / value way.

Let me know if that clears things up, or if I'm missing something.

Oh, maybe I'm missing something. Now that I re-read the code, it looks like config.yml holds the defaults for each setting - but if you change the setting, it gets set back to the (very real) database. So the database value will override the config.yml values, which are intended to be set once by a developer and never touched again. Correct?

Owner

paulca commented Dec 1, 2011

Well, configurable.yml sets the available fields, their types, and their
initial default values, but if there's a value in the database, that will
be used.

On Thursday, December 1, 2011, Jay Levitt <
reply@reply.github.com>
wrote:

Oh, maybe I'm missing something. Now that I re-read the code, it looks
like config.yml holds the defaults for each setting - but if you change
the setting, it gets set back to the (very real) database. So the database
value will override the config.yml values, which are intended to be set
once by a developer and never touched again. Correct?


Reply to this email directly or view it on GitHub:

#8 (comment)

Paul Campbell
paul@hypertiny.ie


web http://hypertiny.ie
blog http://www.pabcas.com
twitter http://www.twitter.com/paulca
github http://www.github.com/paulca
phone +353 87 914 8162


AH hah. got it.

@jaylevitt jaylevitt closed this Dec 1, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment