Add method for rendering Design System views
Add method for rendering Design System views

While we implement unreleased Design System changes, controllers need to switch between rendering a 'legacy' Bootstrap view and the 'new' Design System view. For example, the controller action `new` might have two view files: `new.html.erb` and `new_legacy.html.erb`.

There were a couple of approaches to handling this in the codebase.

Some controllers would do something like this:

```
render(preview_design_system? ? "new" : "new_legacy")
```

whereas other controller would do:

```
render "new_legacy" unless preview_design_system?
```

With the introduction of the `next_release` parameter on `preview_design_system?`, both of the above approaches would get longer and more fiddly:

```
render(preview_design_system?(next_release: true) ? "new" : "new_legacy")
render "new_legacy" unless preview_design_system?(next_release: true)
```

To simplify this and make the code more standardised, I've introduced a method which can be used to conditionally render the Design System. The above can now be written as:

```
render_design_system("new", "new_legacy", next_release: true)
```

Not only is this shorter, but I also think it's easier to read and more intention revealing.

alphagov/whitehall,alphagov/whitehall,alphagov/whitehall,alphagov/whitehall