Fixes #7816 - Refactor strong_params code

Refactor the strong parameters code as Foreman now supports strong_params.