def user_params params.fetch(:user, {}).permit(:id, :production_media_users_attributes: [:id, :user_id, {production_medium_id: []}]) end def project_params params.fetch(:project, {}).permit(:id, genres_projects_attributes: [:id, :project_id, {genre_id: []}]) end