gitlab-org--gitlab-foss/app/controllers/concerns/continue_params.rb

14 lines
339 B
Ruby
Raw Normal View History

2016-03-07 04:36:16 -05:00
module ContinueParams
extend ActiveSupport::Concern
def continue_params
continue_params = params[:continue]
return nil unless continue_params
2016-03-07 05:45:14 -05:00
continue_params = continue_params.permit(:to, :notice, :notice_now)
2016-03-07 04:36:16 -05:00
return unless continue_params[:to] && continue_params[:to].start_with?('/')
continue_params
end
end