alphagov/panopticon — pull request #46 by jystewart (2012-12-19 11:02:23+00:00)
Title: Add admin_url_for_edition method for redirecting

We had a method on the model to get an artefact's admin URL. That didn't really feel like a model concern and is only used in one controller so I've brought it in line here and will remove it from the model.

I considered using a decorator to wrap the artefact and provide the method but that seemed like a lot of overhead for a single method. We should consider something like that if attempting a broader refactor.

(this also helps reduce govuk_content_models' reliance on Plek)