v1.1.0.beta5 - auto database configuration!

17 views
Skip to first unread message

Samuel Lown

unread,
Apr 30, 2011, 7:47:27 AM4/30/11
to couc...@googlegroups.com
Hi,

I've just uploaded the fifth and hopefully last beta of the 1.1 series of CouchRest Model.

This time I'm happy to announce a very exciting and greatly sought after addition: Automatic database configuration.

It is no longer necessary to add "use_database" to all your models as the database comes pre-configured out of the box. It is now trivial to add CouchRest Model to your project and just start using it. If you're using Rails, the database name will be automatically determined from Rails.application.class, otherwise it'll default to 'couchrest'. Of course, all the connection options are configurable either in your initializers from the config/couchdb.yml file if available.

The "use_database" method will still work as expected, but now if you pass it a string the name will be appended to the base database name. If your're proxying databases you no longer need to overwrite `proxy_database`. Just use `proxy_database_method` to set a method to call to determine the suffix to add.

These changes should all be appearing soon in the new Documentation website at http://couchrest.info. This is still a work in progress, but includes most of the examples and documentation from the old oversized README. Contributions would be greatly appreciated: https://github.com/couchrest/couchrest.github.com

Finally, the default "model_type_key" is now just "type" to more closely reflect what most people are used to with ActiveRecord. Hopefully this change from beta4 won't annoy too many people (sorry!), but I think its right to keep this short, simple, and consistent.

Please test and let us know how you get on!

cheers,
Reply all
Reply to author
Forward
0 new messages