Skip to content

Commit

Permalink
Show both user and their requests when searching with full name
Browse files Browse the repository at this point in the history
Closes #13
  • Loading branch information
dngst committed Feb 12, 2024
1 parent 705cb28 commit 2b1eed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def index

# search results
@users = @users_list.ransack(full_name_or_fname_or_lname_or_email_or_phone_number_or_tenant_unit_number_or_tenant_unit_type_or_tenant_property_name_cont: q).result(distinct: true).page(params[:page])
@requests = @requests_list.ransack(title_or_description_or_comments_body_or_user_fname_or_user_lname_cont: q).result(distinct: true).page(params[:page])
@requests = @requests_list.ransack(user_full_name_or_title_or_description_or_comments_body_or_user_fname_or_user_lname_cont: q).result(distinct: true).page(params[:page])
@articles = @articles_list.ransack(title_or_body_or_property_name_cont: q).result(distinct: true).page(params[:page])
@properties = @properties_list.ransack(name_cont: q).result(distinct: true).page(params[:page])
end
Expand Down

0 comments on commit 2b1eed9

Please sign in to comment.