twg/comfortable-mexican-sofa — pull request #123 by jhawthorn (2012-01-06 09:10:11+00:00)
Title: Don't clear cache on reorder actions

On the snippets reorder action, for each snippet, callbacks are run, clearing the cache for each page (num snippets * num pages database updates). For a reasonably sized site this will take minutes.

This commit addresses this by never instantiating database objects when reordering.

Cms::Snippet.where(:id => id).update_all(:position => index)

also makes the same change for pages and layouts.