diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index 74756f2f3..cc6162175 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -27,7 +27,7 @@ def index search_without_params end @paginated_profiles = @profiles.page(params[:page]).per(24) - @profiles_count = @profiles.size + @profiles_count = @paginated_profiles.total_count end def show diff --git a/app/views/shared/_search_filter.erb b/app/views/shared/_search_filter.erb index e553d2b47..7249d1662 100644 --- a/app/views/shared/_search_filter.erb +++ b/app/views/shared/_search_filter.erb @@ -1,4 +1,4 @@ -<% if profiles_count > 0 %> +<% if @profiles_count > 0 %>