Closed walter closed 10 years ago
Why not just add store_in Popolo.storage_options
to each model, and make storage_options
be the class variable? The default value of storage_options
can be {}
.
Originally I was also going to allow for configuration of collection, i.e. distinct per model configuration, which is probably why I built it the way I did.
I found configuring collection problematic, so I fell back to just database and session.
The simplified way certainly gets rid of a decent amount of boilerplate and makes the intention clearer. Will get back to you with a new commit.
@jpmckinney that do the trick?
Instead of { session: :default, database: :default }
, just use {}
. That way, we won't override any global settings the user may have set.
Think that does it.
Allows for setting a different session and database for the models.