Update personal_books_controller.rb

This commit is contained in:
chiu 2019-08-14 15:03:34 +08:00
parent 7d94f13928
commit fcbd1d786c
1 changed files with 1 additions and 1 deletions

View File

@ -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"