Please don't duplicate the code for CP retrieval. Could you please refactor [this](https://github.com/openwisp/OpenWISP-Captive-Portals-Manager/blob/master/app/controllers/redirections_controller.rb#L36) with an helper method?