I was actually just copying the [OrganisationsController](https://github.com/alphagov/whitehall/blob/b02b643095119382b9bb0a0189d29770816bc27f/app/controllers/organisations_controller.rb#L7), but looking at that class it's probably done wrong there as well.