<commit_before>class BookController < ApplicationController
  def index
    @books = Book.includes

    @books.each do |book| 
      @user = User.find(book.user_id)
      book.user = @user
    end

    #@books = Book.find(2, :include => [:user])
    render :json => @books
  end

  def show
    render :json => Book.find(params[:id])
  end

  def create
    book = Document.create! params
    render :json => book
  end

  def destroy
  end

  def update
  end
  def lookup
   @isbn = params[:id]
   require 'googlebooks'
   books = GoogleBooks.search('isbn:'+@isbn)  #9781443411080') 
   book = books.first
   render :json => book  
  end
  def mybook
    render :json => current_user.books
  end
end
<commit_msg>controller controller controller<commit_after>class BookController < ApplicationController
  def index
    @books = Book.includes

    @books.each do |book| 
      @user = User.find(book.user_id)
      book.user = @user
    end

    #@books = Book.find(2, :include => [:user])
    render :json => @books
  end

  def show
    render :json => Book.find(params[:id])
  end

  def create
    book = Book.create! params
    render :json => book
  end

  def destroy
    Book.find(params[:id]).destroy
  end

  def update
    @book = Book.find(params[:id])
    if @book.update_attributes(books_params) #
      redirect_to(:action => 'show', :id => @book.id)
    else
      render('edit')
    end
  end
  def lookup
   @isbn = params[:id]
   require 'googlebooks'
   books = GoogleBooks.search('isbn:'+@isbn)  #9781443411080') 
   book = books.first
   render :json => book  
  end
  def mybook
    render :json => current_user.books
  end
end

{'fraction_non_alphanumeric': 0.11924939467312348, 'fraction_numerical': 0.01694915254237288, 'mean_word_length': 2.722972972972973, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '1548618', 'n_tokens_mistral': 579, 'n_tokens_neox': 544, 'n_words': 146}