<commit_before>module Web::Controllers::Tasks
  class Create
    include Web::Action

    expose :task

    params do
      required(:task).schema do
        required(:title).filled(:str?)
        required(:body).filled(:str?)
      end
    end

    def call(params)
      if params.valid?
        @task = TaskRepository.new.create(params[:task])
        redirect_to routes.tasks_path
      else
        @task = Task.new(params[:task])
        self.body = Web::Views::Tasks::New.render(format: format, task: @task, params: params)
      end
    end
  end
end<commit_msg>Fix tests<commit_after>module Web::Controllers::Tasks
  class Create
    include Web::Action

    expose :task

    params do
      required(:task).schema do
        required(:title).filled(:str?)
        required(:body).filled(:str?)
      end
    end

    def call(params)
      if params.valid?
        @task = TaskRepository.new.create(params[:task])
        redirect_to routes.tasks_path
      else
        @task = Task.new(params[:task])
        self.body = Web::Views::Tasks::New.render(format: format, task: @task, current_user: current_user, params: params)
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.12027491408934708, 'fraction_numerical': 0.0, 'mean_word_length': 2.6180124223602483, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7132607', 'n_tokens_mistral': 344, 'n_tokens_neox': 341, 'n_words': 78}