<commit_before>class MoviesController < ApplicationController
    def index
        render json: Movie.all, each_serializer: MovieSerializer, root: 'movies'
    end

    def show
        render json: Movie.find_by_id(params[:id]), root: 'movie'
    end

    def new
        render json: Movie.new, root: 'movie'
    end

    def create
        movie = Movie.new(movie_params)

        movie.save
        render json: movie, root: 'movie'
    end

    def update
        movie = Movie.find_by_id(params[:id])

        movie.update(movie_params)
        render json: Movie.find_by_id(params[:id]), root: 'movie'
    end

    def destroy
        movie = Movie.find_by_id(params[:id])
        movie.destroy

        render json: '{"movie": {}}'
    end

    def search
        movies = Tmdb::Movie.find(params[:id])
        render json: movies.to_json
    end<commit_msg>Rails remove movies.new endpoint<commit_after>class MoviesController < ApplicationController
    def index
        render json: Movie.all, each_serializer: MovieSerializer, root: 'movies'
    end

    def show
        render json: Movie.find_by_id(params[:id]), root: 'movie'
    end

    def create
        movie = Movie.new(movie_params)

        movie.save
        render json: movie, root: 'movie'
    end

    def update
        movie = Movie.find_by_id(params[:id])

        movie.update(movie_params)
        render json: Movie.find_by_id(params[:id]), root: 'movie'
    end

    def destroy
        movie = Movie.find_by_id(params[:id])
        movie.destroy

        render json: '{"movie": {}}'
    end

    def search
        movies = Tmdb::Movie.find(params[:id])
        render json: movies.to_json
    end
{'fraction_non_alphanumeric': 0.10260972716488731, 'fraction_numerical': 0.0, 'mean_word_length': 2.353876739562624, 'pattern_counts': {'":': 2, '<': 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': '3131997', 'n_tokens_mistral': 536, 'n_tokens_neox': 503, 'n_words': 130}