From 4a9213d5ad4faa59b605d269ff06417771bb5c88 Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 15 Aug 2019 10:03:39 +0800 Subject: [PATCH] Update personal_books_controller.rb --- app/controllers/personal_books_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/personal_books_controller.rb b/app/controllers/personal_books_controller.rb index 8f72c34..cc77b5e 100644 --- a/app/controllers/personal_books_controller.rb +++ b/app/controllers/personal_books_controller.rb @@ -29,10 +29,10 @@ class PersonalBooksController < ApplicationController books_temp = Book.where(:is_hidden=>false).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] } case params[:selectbox] when "book_title", "extracted_chapters", "default" - if params[:selectbox]=="dafault" - search_temp="book_title" + if params[:selectbox] == "dafault" + search_temp = "book_title" else - search_temp=params[:selectbox] + search_temp = params[:selectbox] end if page.custom_string_field == "table" books_show = books_temp.select {|value| search_all_words(value.send(search_temp), params[:keywords])}