#kaminariを使ったときの undefined method `total_pages' の解決方法
before
films_controller.rb
def search
@searched_films = Film.search(params[:search])
end
after
films_controller.rb
def search
@searched_films = Film.search(params[:search])
@searched_films = @searched_films.page(params[:page])
end