From 5b0650674623e2efcdc369806e0d006574700e4a Mon Sep 17 00:00:00 2001 From: Alicia Date: Thu, 29 Feb 2024 18:52:44 -0600 Subject: [PATCH] Autocomplete feature --- .ruby-version | 2 +- Gemfile | 18 +++++----- Gemfile.lock | 3 +- app/components/search_bar/component.html.erb | 10 ++++-- app/controllers/autocompletes_controller.rb | 13 +++++++ .../controllers/autocomplete_controller.js | 34 +++++++++++++++++++ app/queries/locations/keyword_query.rb | 2 +- app/views/home/index.html.slim | 12 +++---- config/routes.rb | 2 ++ 9 files changed, 75 insertions(+), 21 deletions(-) create mode 100644 app/controllers/autocompletes_controller.rb create mode 100644 app/javascript/controllers/autocomplete_controller.js diff --git a/.ruby-version b/.ruby-version index b50214693..a0cd9f0cc 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.2 +3.1.0 \ No newline at end of file diff --git a/Gemfile b/Gemfile index 4ece8629c..a8baaf126 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '3.0.2' +ruby '3.1.0' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' gem 'rails', '~> 6.1.4' @@ -30,12 +30,13 @@ gem 'redis', '~> 4.0' gem 'devise' # User Auth -gem "recaptcha" -gem "invisible_captcha" +gem 'invisible_captcha' +gem 'recaptcha' +gem 'activerecord-import' gem 'active_storage_validations' gem 'aws-sdk-s3', require: false -gem "caxlsx" +gem 'caxlsx' gem 'clockwork' gem 'cocoon' gem 'draper' @@ -47,13 +48,12 @@ gem 'pagy' gem 'pg_search' gem 'pundit' gem 'rack-attack' +gem 'rollbar' gem 'roo', '~> 2.8.0' -gem "sidekiq", "<7" +gem 'scout_apm' +gem 'sidekiq', '<7' gem 'slim-rails' gem 'view_component' -gem "activerecord-import" -gem 'scout_apm' -gem 'rollbar' # Use Turbo for rails gem 'turbo-rails' @@ -116,7 +116,7 @@ group :test do gem 'shoulda-matchers', '~> 4.0' gem 'simplecov', require: false gem 'timecop' - gem 'webdrivers', "~> 5.2", require: false + gem 'webdrivers', '~> 5.2', require: false end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem diff --git a/Gemfile.lock b/Gemfile.lock index f6939353e..6b1122cba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -556,6 +556,7 @@ GEM PLATFORMS arm64-darwin-20 arm64-darwin-21 + arm64-darwin-23 x86_64-darwin-19 x86_64-darwin-20 x86_64-linux @@ -634,7 +635,7 @@ DEPENDENCIES webpacker (~> 5.0) RUBY VERSION - ruby 3.0.2p107 + ruby 3.1.0p0 BUNDLED WITH 2.3.22 diff --git a/app/components/search_bar/component.html.erb b/app/components/search_bar/component.html.erb index ab8385afc..c2b3a4512 100644 --- a/app/components/search_bar/component.html.erb +++ b/app/components/search_bar/component.html.erb @@ -1,7 +1,7 @@