<commit_before>class CallRoutesController < ApplicationController
  load_and_authorize_resource :call_route
  before_filter :spread_breadcrumbs

  def index
    @call_routes = CallRoute.order([:routing_table, :position])
    @routing_tables = @call_routes.pluck(:routing_table).uniq.sort
  end

  def show
    @call_route = CallRoute.find(params[:id])
  end

  def new
    @call_route = CallRoute.new
  end

  def create
    @call_route = CallRoute.new(call_route_parameter_params)
    if @call_route.save
      redirect_to @call_route, :notice => t('call_routes.controller.successfuly_created')
    else
      render :new
    end
  end

  def edit
  end

  def update
    @call_route = CallRoute.find(params[:id])
    if @call_route.update_attributes(call_route_parameter_params)
      redirect_to @call_route, :notice  => t('call_routes.controller.successfuly_updated')
    else
      render :edit
    end
  end

  def destroy
    @call_route = CallRoute.find(params[:id])
    @call_route.destroy
    redirect_to call_routes_url, :notice => t('call_routes.controller.successfuly_destroyed')
  end

  private
  def call_route_parameter_params
    params.require(:call_route).permit(:routing_table, :name, :endpoint_type, :endpoint_id)
  end

  def spread_breadcrumbs
    add_breadcrumb t("call_routes.index.page_title"), call_routes_path
    if @call_route && !@call_route.new_record?
      add_breadcrumb @call_route, call_route_path(@call_route)
    end
  end

end<commit_msg>move actions added<commit_after>class CallRoutesController < ApplicationController
  load_and_authorize_resource :call_route
  before_filter :spread_breadcrumbs

  def index
    @call_routes = CallRoute.order([:routing_table, :position])
    @routing_tables = @call_routes.pluck(:routing_table).uniq.sort
  end

  def show
    @call_route = CallRoute.find(params[:id])
  end

  def new
    @call_route = CallRoute.new
  end

  def create
    @call_route = CallRoute.new(call_route_parameter_params)
    if @call_route.save
      redirect_to @call_route, :notice => t('call_routes.controller.successfuly_created')
    else
      render :new
    end
  end

  def edit
  end

  def update
    @call_route = CallRoute.find(params[:id])
    if @call_route.update_attributes(call_route_parameter_params)
      redirect_to @call_route, :notice  => t('call_routes.controller.successfuly_updated')
    else
      render :edit
    end
  end

  def destroy
    @call_route = CallRoute.find(params[:id])
    @call_route.destroy
    redirect_to call_routes_url, :notice => t('call_routes.controller.successfuly_destroyed')
  end

  def move_higher
    @call_route.move_higher
    redirect_to :back
  end

  def move_lower
    @call_route.move_lower
    redirect_to :back
  end

  private
  def call_route_parameter_params
    params.require(:call_route).permit(:routing_table, :name, :endpoint_type, :endpoint_id)
  end

  def spread_breadcrumbs
    add_breadcrumb t("call_routes.index.page_title"), call_routes_path
    if @call_route && !@call_route.new_record?
      add_breadcrumb @call_route, call_route_path(@call_route)
    end
  end

end
{'fraction_non_alphanumeric': 0.08678881388621022, 'fraction_numerical': 0.0, 'mean_word_length': 4.110016420361248, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '7647120', 'n_tokens_mistral': 1045, 'n_tokens_neox': 1046, 'n_words': 193}