{"issue":{"created_at":"2011-11-02T01:06:45Z","state":"open","updated_at":"2011-11-23T13:35:13Z","user":{"gravatar_id":"ee075c7c5bdcad2baed4915630fe9a39","id":46888,"url":"https://api.github.com/users/kylev","login":"kylev","avatar_url":"https://secure.gravatar.com/avatar/ee075c7c5bdcad2baed4915630fe9a39?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":18,"body":"Right now I'm putting \"ensure_index\" statements right in my models, but this seems likely to cause problems (or at least a lot of no-ops).  How are people using ensure_index?  Do they call it from a rake task post-deploy?  Put it in an initializer and hope everyone remembers to set \":background => true\" or suffer blocking deploy hell?\r\n\r\nIt seems like a pretty important topic for it to be utterly absent from the docs.","assignee":null,"id":2117053,"number":337,"labels":[{"name":"documentation","color":"444444","url":"https://api.github.com/repos/jnunemaker/mongomapper/labels/documentation"}],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Document best practices for ensure_index","closed_at":null,"html_url":"https://github.com/jnunemaker/mongomapper/issues/337","milestone":null,"url":"https://api.github.com/repos/jnunemaker/mongomapper/issues/337"},"action":"created","comment":{"created_at":"2011-11-23T13:35:13Z","updated_at":"2011-11-23T13:35:13Z","user":{"gravatar_id":"4b1b339ee3f96d37aba2adfa3e03276e","id":173,"url":"https://api.github.com/users/bkeepers","login":"bkeepers","avatar_url":"https://secure.gravatar.com/avatar/4b1b339ee3f96d37aba2adfa3e03276e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I could go either way. Feel free to submit a patch to make it work like you describe.","id":2848663,"url":"https://api.github.com/repos/jnunemaker/mongomapper/issues/comments/2848663"}}