<commit_before>class ListsController < ApplicationController

  get '/lists/new' do
    redirect_if_not_logged_in
    erb :'/lists/new'
  end

  post '/lists/new' do 
    @user = current_user
    list = @user.lists.create(name: params[:name])
    task = list.tasks.create(name: params[:tasks][:name])
    redirect '/tasks'
  end

  get '/lists/:id/edit' do
    redirect_if_not_logged_in
    @list = List.find_by_id(params[:id])
    erb :'/lists/edit'
  end


end<commit_msg>Created PATCH request for '/lists/:id'<commit_after>class ListsController < ApplicationController

  get '/lists/new' do
    redirect_if_not_logged_in
    erb :'/lists/new'
  end

  post '/lists/new' do 
    @user = current_user
    list = @user.lists.create(name: params[:name])
    task = list.tasks.create(name: params[:tasks][:name])
    redirect '/tasks'
  end

  get '/lists/:id/edit' do
    redirect_if_not_logged_in
    @list = List.find_by_id(params[:id])
    erb :'/lists/edit'
  end

  patch "/lists/:id" do
    @list = List.find_by_id(params[:id])
    @list.name = params[:name]
    @list.save
    redirect '/tasks'
  end

end
{'fraction_non_alphanumeric': 0.1393884892086331, 'fraction_numerical': 0.0, 'mean_word_length': 3.215909090909091, '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': '4649323', 'n_tokens_mistral': 410, 'n_tokens_neox': 399, 'n_words': 82}