<commit_before>class TomatoesController < ApplicationController
  before_filter :authenticate_user!
  
  # GET /tomatoes
  # GET /tomatoes.xml
  def index
    @tomatoes = current_user.tomatoes.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @tomatoes }
    end
  end

  # GET /tomatoes/1
  # GET /tomatoes/1.xml
  def show
    @tomato = current_user.tomatoes.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @tomato }
    end
  end

  # GET /tomatoes/new
  # GET /tomatoes/new.xml
  def new
    @tomato = current_user.tomatoes.build

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @tomato }
    end
  end

  # GET /tomatoes/1/edit
  def edit
    @tomato = current_user.tomatoes.find(params[:id])
  end

  # POST /tomatoes
  # POST /tomatoes.xml
  def create
    @tomato = current_user.tomatoes.build(params[:tomato])

    respond_to do |format|
      if @tomato.save
        format.html { redirect_to(@tomato, :notice => 'Tomato was successfully created.') }
        format.xml  { render :xml => @tomato, :status => :created, :location => @tomato }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @tomato.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /tomatoes/1
  # PUT /tomatoes/1.xml
  def update
    @tomato = current_user.tomatoes.find(params[:id])

    respond_to do |format|
      if @tomato.update_attributes(params[:tomato])
        format.html { redirect_to(@tomato, :notice => 'Tomato was successfully updated.') }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @tomato.errors, :status => :unprocessable_entity }<commit_msg>update tomatoes creation redirect url<commit_after>class TomatoesController < ApplicationController
  before_filter :authenticate_user!
  
  # GET /tomatoes
  # GET /tomatoes.xml
  def index
    @tomatoes = current_user.tomatoes.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @tomatoes }
    end
  end

  # GET /tomatoes/1
  # GET /tomatoes/1.xml
  def show
    @tomato = current_user.tomatoes.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @tomato }
    end
  end

  # GET /tomatoes/new
  # GET /tomatoes/new.xml
  def new
    @tomato = current_user.tomatoes.build

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @tomato }
    end
  end

  # GET /tomatoes/1/edit
  def edit
    @tomato = current_user.tomatoes.find(params[:id])
  end

  # POST /tomatoes
  # POST /tomatoes.xml
  def create
    @tomato = current_user.tomatoes.build(params[:tomato])

    respond_to do |format|
      if @tomato.save
        format.html { redirect_to(root_url, :notice => 'Tomato was successfully created.') }
        format.xml  { render :xml => @tomato, :status => :created, :location => @tomato }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @tomato.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /tomatoes/1
  # PUT /tomatoes/1.xml
  def update
    @tomato = current_user.tomatoes.find(params[:id])

    respond_to do |format|
      if @tomato.update_attributes(params[:tomato])
        format.html { redirect_to(@tomato, :notice => 'Tomato was successfully updated.') }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @tomato.errors, :status => :unprocessable_entity }
{'fraction_non_alphanumeric': 0.12017053024247269, 'fraction_numerical': 0.002664535038635758, 'mean_word_length': 2.5992329817833175, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 36}, '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': '7043506', 'n_tokens_mistral': 1271, 'n_tokens_neox': 1243, 'n_words': 294}