Newer
Older
dmpopidor / app / controllers / splash_logs_controller.rb
@Brian Riley Brian Riley on 7 Sep 2018 458 bytes Remove old JS form validations (#1867)
# frozen_string_literal: true

class SplashLogsController < ApplicationController

  respond_to :html

  ##
  # POST /answers
  def create
    @splash_log = SplashLog.new()
    @splash_log.destination = params[:destination]
    if @splash_log.save
      cookies[:dmp_splash_seen] = {
        value: "splash_dialog_seen",
        expires: 3.hours.from_now,
      }
      redirect_to params[:destination]
    else
      redirect_to home_url
    end
  end

end