From 796a070af48eb1e8bd16bba9119e056abdc504e8 Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Sat, 15 Jan 2022 16:02:05 -0500 Subject: [PATCH] Display & Add Flights --- Gemfile | 1 + Gemfile.lock | 21 +++++++++++++++++++++ app/assets/javascripts/application.js | 3 +++ app/assets/stylesheets/application.css | 15 --------------- config/routes.rb | 3 +-- 5 files changed, 26 insertions(+), 17 deletions(-) delete mode 100644 app/assets/stylesheets/application.css diff --git a/Gemfile b/Gemfile index 1d6772f..2790d80 100644 --- a/Gemfile +++ b/Gemfile @@ -34,6 +34,7 @@ gem 'jbuilder', '~> 2.5' # gem 'capistrano-rails', group: :development gem 'bootstrap' +gem 'jquery-rails' # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.1.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 04210f7..1303eea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,9 +47,15 @@ GEM archive-zip (0.12.0) io-like (~> 0.3.0) arel (9.0.0) + autoprefixer-rails (10.4.2.0) + execjs (~> 2) bindex (0.8.1) bootsnap (1.9.4) msgpack (~> 1.0) + bootstrap (5.1.3) + autoprefixer-rails (>= 9.1.0) + popper_js (>= 2.9.3, < 3) + sassc-rails (>= 2.0.0) builder (3.2.4) byebug (11.1.3) capybara (3.36.0) @@ -85,6 +91,10 @@ GEM jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) + jquery-rails (4.3.3) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) @@ -106,6 +116,7 @@ GEM racc (~> 1.4) nokogiri (1.13.1-x86_64-linux) racc (~> 1.4) + popper_js (2.9.3) public_suffix (4.0.6) puma (3.12.6) racc (1.6.0) @@ -154,6 +165,14 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) + sassc (2.4.0) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt selenium-webdriver (4.1.0) childprocess (>= 0.5, < 5.0) rexml (~> 3.2, >= 3.2.5) @@ -197,11 +216,13 @@ PLATFORMS DEPENDENCIES bootsnap (>= 1.1.0) + bootstrap byebug capybara (>= 2.15) chromedriver-helper coffee-rails (~> 4.2) jbuilder (~> 2.5) + jquery-rails listen puma (~> 3.11) rails (~> 5.2.3) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 82e6f0f..b7d8d81 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -14,3 +14,6 @@ //= require activestorage //= require turbolinks //= require_tree . +//= require jquery3 +//= require popper +//= require bootstrap-sprockets diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css deleted file mode 100644 index d05ea0f..0000000 --- a/app/assets/stylesheets/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's - * vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - */ diff --git a/config/routes.rb b/config/routes.rb index 9a48416..0fc9a43 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,5 @@ Rails.application.routes.draw do root "flights#index" - get "/flights", to: "flights#index" - get "/flights/:id", to: "flights#show" + resources :flights end