<commit_before>class FoodListsController < MyplaceonlineController
  def footer_items_show
    result = super
    
    if !MyplaceonlineExecutionContext.offline?
      result << {
        title: I18n.t("myplaceonline.food_lists.add_food"),
        link: new_food_list_food_list_food_path(@obj),
        icon: "plus"
      }
    end
    
    result << {
      title: I18n.t("myplaceonline.food_lists.foods"),
      link: food_list_food_list_foods_path(@obj),
      icon: "bars"
    }
    
    result
  end
  
  protected
    def insecure
      true
    end

    def default_sort_direction
      "desc"
    end

    def additional_sorts
      [
        [I18n.t("myplaceonline.food_lists.food_list_name"), default_sort_columns[0]]
      ]
    end

    def default_sort_columns
      ["food_lists.food_list_name"]
    end

    def obj_params
      params.require(:food_list).permit(
        :food_list_name,<commit_msg>Fix food list default sorting<commit_after>class FoodListsController < MyplaceonlineController
  def footer_items_show
    result = super
    
    if !MyplaceonlineExecutionContext.offline?
      result << {
        title: I18n.t("myplaceonline.food_lists.add_food"),
        link: new_food_list_food_list_food_path(@obj),
        icon: "plus"
      }
    end
    
    result << {
      title: I18n.t("myplaceonline.food_lists.foods"),
      link: food_list_food_list_foods_path(@obj),
      icon: "bars"
    }
    
    result
  end
  
  protected
    def insecure
      true
    end

    def default_sort_direction
      "asc"
    end

    def additional_sorts
      [
        [I18n.t("myplaceonline.food_lists.food_list_name"), default_sort_columns[0]]
      ]
    end

    def default_sort_columns
      ["food_lists.food_list_name"]
    end

    def obj_params
      params.require(:food_list).permit(
        :food_list_name,
{'fraction_non_alphanumeric': 0.08563685636856369, 'fraction_numerical': 0.007588075880758808, 'mean_word_length': 2.4634146341463414, 'pattern_counts': {'":': 0, '<': 13, '<?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': '6425694', 'n_tokens_mistral': 624, 'n_tokens_neox': 600, 'n_words': 99}