From fcbd1d786c3021b87901cf0b684cc0efb0f779a0 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 14 Aug 2019 15:03:34 +0800 Subject: [PATCH] Update personal_books_controller.rb --- app/controllers/personal_books_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/personal_books_controller.rb b/app/controllers/personal_books_controller.rb index 8b83b5c..afcb43a 100644 --- a/app/controllers/personal_books_controller.rb +++ b/app/controllers/personal_books_controller.rb @@ -32,7 +32,7 @@ class PersonalBooksController < ApplicationController books_show = books_temp.select {|value| value.create_link.include? params[:keywords]} end when "publish_date", "publication_date" - books_show = books_temp.select {|value| value.publication_date.strftime("%Y/%m").include? params[:keywords]} + books_show = books_temp.select {|value| value.publication_date.strftime("%Y/%m").to_s.include? params[:keywords]} when "author_type" books_show = books_temp.select {|value| value.book_author_types.collect{|bat| bat.title}.join(", ").include? params[:keywords]} when "language"