Update personal_books_controller.rb
This commit is contained in:
parent
d004d722ca
commit
4a9213d5ad
|
@ -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] }
|
books_temp = Book.where(:is_hidden=>false).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] }
|
||||||
case params[:selectbox]
|
case params[:selectbox]
|
||||||
when "book_title", "extracted_chapters", "default"
|
when "book_title", "extracted_chapters", "default"
|
||||||
if params[:selectbox]=="dafault"
|
if params[:selectbox] == "dafault"
|
||||||
search_temp="book_title"
|
search_temp = "book_title"
|
||||||
else
|
else
|
||||||
search_temp=params[:selectbox]
|
search_temp = params[:selectbox]
|
||||||
end
|
end
|
||||||
if page.custom_string_field == "table"
|
if page.custom_string_field == "table"
|
||||||
books_show = books_temp.select {|value| search_all_words(value.send(search_temp), params[:keywords])}
|
books_show = books_temp.select {|value| search_all_words(value.send(search_temp), params[:keywords])}
|
||||||
|
|
Loading…
Reference in New Issue