gitlab-org--gitlab-foss/app/controllers/concerns/continue_params.rb
Zeger-Jan van de Weg 5352ec2e21 Fix denting and spec
2016-03-13 13:44:31 +01:00

13 lines
339 B
Ruby

module ContinueParams
extend ActiveSupport::Concern
def continue_params
continue_params = params[:continue]
return nil unless continue_params
continue_params = continue_params.permit(:to, :notice, :notice_now)
return unless continue_params[:to] && continue_params[:to].start_with?('/')
continue_params
end
end