<commit_before>#
# Namespace for the Socializer engine
#
module Socializer
  module People
    #
    # Places controller
    #
    class PlacesController < ApplicationController
      before_action :authenticate_user

      # POST /people/1/places
      def create
        @place = current_user.places.create!(params[:person_place])

        redirect_to current_user
      end

      # PATCH/PUT /people/1/places/1
      def update
        @place = find_person_place
        @place.update!(params[:person_place])

        redirect_to current_user
      end

      # DELETE /people/1/places/1
      def destroy
        @place = find_person_place
        @place.destroy

        redirect_to current_user
      end

      private

      def find_person_place
        current_user.places.find_by(id: params[:id])
      end
    end
  end
end<commit_msg>rename the find_person_place method to find_place<commit_after>#
# Namespace for the Socializer engine
#
module Socializer
  module People
    #
    # Places controller
    #
    class PlacesController < ApplicationController
      before_action :authenticate_user

      # POST /people/1/places
      def create
        @place = current_user.places.create!(params[:person_place])

        redirect_to current_user
      end

      # PATCH/PUT /people/1/places/1
      def update
        @place = find_place
        @place.update!(params[:person_place])

        redirect_to current_user
      end

      # DELETE /people/1/places/1
      def destroy
        @place = find_place
        @place.destroy

        redirect_to current_user
      end

      private

      def find_place
        current_user.places.find_by(id: params[:id])
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.06779661016949153, 'fraction_numerical': 0.0058445353594389245, 'mean_word_length': 2.1821561338289963, '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': '3222649', 'n_tokens_mistral': 516, 'n_tokens_neox': 482, 'n_words': 114}