Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby
434 B
Raw Blame
class Import::ConfirmsController < ApplicationController
  include ViewableImports
  layout "imports"

  before_action :set_import

  def show
    if @import.mapping_steps.empty?
      return redirect_to import_path(@import)
    end

    redirect_to import_clean_path(@import), alert: t(".invalid_data") unless @import.cleaned?
  end

  private
    def set_import
      @import = viewable_imports.find(params[:import_id])
    end
end