<commit_before>#
# Copyright (c) 2013-2017 SKYARCH NETWORKS INC.
#
# This software is released under the MIT License.
#
# http://opensource.org/licenses/mit-license.php
#

class RootController < ApplicationController
  def root
    if AppSetting.set?
      authenticate_user!

      params[:action] = :index

      params[:controller] =
        if current_user.master?
          :clients
        else
          :projects
        end

      redirect_to params.to_hash and return
    else
      redirect_to app_settings_path and return
    end
  end
end<commit_msg>Fix: rootパスでリダイレクトが正常に行われない不具合の修正<commit_after>#
# Copyright (c) 2013-2017 SKYARCH NETWORKS INC.
#
# This software is released under the MIT License.
#
# http://opensource.org/licenses/mit-license.php
#

class RootController < ApplicationController
  def root
    if AppSetting.set?
      authenticate_user!

      redirect_params = params.permit(:lang)
      redirect_params[:action] = :index
      redirect_params[:controller] =
        if current_user.master?
          :clients
        else
          :projects
        end

      redirect_to redirect_params and return
    else
      redirect_to app_settings_path and return
    end
  end
end
{'fraction_non_alphanumeric': 0.07196029776674938, 'fraction_numerical': 0.013234077750206782, 'mean_word_length': 2.6666666666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7228970', 'n_tokens_mistral': 385, 'n_tokens_neox': 365, 'n_words': 92}