CouchRest Model 1.1.0.beta4 tagged and released

17 views
Skip to first unread message

Samuel Lown

unread,
Apr 20, 2011, 11:03:49 AM4/20/11
to couc...@googlegroups.com
Hi,

I've just pushed a new beta release of CouchRest Model. There are some really interesting changes in place now:

1. Dirty Tracking. Its been attempted in the past but always turned out to have a detrimental effect to speed, and never worked properly with casted models. Thanks to Andrew Williams's efforts (@sobakasu) this no longer seems to be an issue. Please test and let us know how you get on! Heres the pull request should you want to see the full details:


2. 'couchrest-type' now renamed to 'model'. This is quite an important change which will effect everyone. I've been resisting it for a while, but eventually decided that it just doesn't make sense to have document types set to 'couchrest-type' when it is not couchrest specific. There is no reason a CouchApp couldn't make use of the same value.

If you don't want to migrate your database, simply set the model key type manually in your initializers:

    CouchRest::Model::Base.configure do |config|
      config.model_type_key = 'couchrest-type'
    end

3. Design document checksums. Each design document is now created with a 'couchrest-hash' attribute. The idea is that changes are detected by seeing if the checksum is still the same. In addition to the caching, this should result in fewer requests to the database. 

The 'auto_update_design_doc' configuration option allows you to completely disable CouchRest Model's updates of the design documents, unless specifically requested:

    Project.save_design_doc!

Please test and let us know if you have any problems!

Cheers,
sam
Reply all
Reply to author
Forward
0 new messages