supply search object for my_request_for_comments

This commit is contained in:
Ralf Teusner
2017-04-04 11:08:20 +02:00
parent 516d29d40d
commit 6eea338f84

View File

@ -17,7 +17,8 @@ class RequestForCommentsController < ApplicationController
end
def get_my_comment_requests
@request_for_comments = RequestForComment.where(user_id: current_user.id).order('created_at DESC').paginate(page: params[:page])
@search = RequestForComment.where(user_id: current_user.id).order('created_at DESC').search(params[:q])
@request_for_comments = @search.result.paginate(page: params[:page])
render 'index'
end