<commit_before>class PinsController < ApplicationController
  def index
    @pins = Pin.all
    if request.xhr?
        respond_to do |format|
          format.json { render json: @pins }
        end
    end
  end

  def new
    @pin = Pin.new
  end

  def create
    @user = User.find(params[:id])
    @pin = Pin.new(song_id: params[:song_id], user: @user.id, latitude: params[:lat], longitude: params[:lng], song_id: params[:song_id])
    redirect_to "pins/_form"
  end<commit_msg>Fix controller create method with local variables<commit_after>class PinsController < ApplicationController
  def index
    @pins = Pin.all
    if request.xhr?
        respond_to do |format|
          format.json { render json: @pins }
        end
    end
  end

  def new
    @pin = Pin.new
  end

  def create
    user = User.find(params[:id])
    @pin = Pin.new(song_id: params[:song_id], user: user.id, latitude: params[:lat], longitude: params[:lng], song_id: params[:song_id])
    redirect_to "pins/_form"
  end
{'fraction_non_alphanumeric': 0.114, 'fraction_numerical': 0.0, 'mean_word_length': 2.925490196078431, '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': '7639640', 'n_tokens_mistral': 343, 'n_tokens_neox': 322, 'n_words': 89}