anthonymidili/EasyKeep

View on GitHub
app/controllers/welcome_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class WelcomeController < ApplicationController
  before_action :create_new_company

  # root route of the application
  def home
    redirect_to dashboard_path if user_signed_in?
  end

  def about
  end

  def contact_us
  end

  def sitemap
  end

private

  def create_new_company
    redirect_to new_company_path if user_signed_in? && current_user.is_admin? && current_company.nil?
  end
end