From da24c448d327078cf6091686855fcdaac114bd06 Mon Sep 17 00:00:00 2001 From: Rob Zolkos Date: Fri, 2 Feb 2024 16:13:41 +0000 Subject: [PATCH 1/4] Use latest turbo This release packs in morphing and will be released soon. Worth making sure things work with this. --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index e6f509e3..c1df3aeb 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem "puma", ">= 5.0" gem "importmap-rails" # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] -gem "turbo-rails" +gem "turbo-rails", github: "hotwired/turbo-rails", branch: "main" # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] gem "stimulus-rails" From 797a8e1cd0bacd8ea3e36185f4fb6a9063be3fab Mon Sep 17 00:00:00 2001 From: Rob Zolkos Date: Fri, 2 Feb 2024 16:15:44 +0000 Subject: [PATCH 2/4] Update layout for new morphing --- app/views/layouts/application.html.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index da66941b..c9637834 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -6,12 +6,10 @@ - + <%= csrf_meta_tags %> <%= csp_meta_tag %> - <%= yield :head %> - @@ -20,6 +18,9 @@ <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> <%= javascript_importmap_tags %> <%= hotwire_livereload_tags if Rails.env.development? %> + + <%= turbo_refreshes_with method: :morph, scroll: :preserve %> + <%= yield :head %> From 4e273be0af84c17410244dd9d976ae5ee40c639d Mon Sep 17 00:00:00 2001 From: Rob Zolkos Date: Fri, 2 Feb 2024 17:11:47 +0000 Subject: [PATCH 3/4] Update turbo --- Gemfile.lock | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d3f7d9f6..36332881 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,13 @@ +GIT + remote: https://github.com/hotwired/turbo-rails.git + revision: 3748512710a29b541a1f2b3863cc6fb2422fb7e2 + branch: main + specs: + turbo-rails (2.0.0.pre.rc.2) + actionpack (>= 6.0.0) + activejob (>= 6.0.0) + railties (>= 6.0.0) + GIT remote: https://github.com/rails/rails.git revision: e09e61af0d4aa7c0e5e138c52a194e316449b51a @@ -296,10 +306,6 @@ GEM railties (>= 6.0.0) thor (1.3.0) timeout (0.4.1) - turbo-rails (1.5.0) - actionpack (>= 6.0.0) - activejob (>= 6.0.0) - railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) @@ -347,7 +353,7 @@ DEPENDENCIES selenium-webdriver stimulus-rails tailwindcss-rails - turbo-rails + turbo-rails! tzinfo-data web-console From 787f0d864eaade206aeb2abb7fd6d7e299a072cf Mon Sep 17 00:00:00 2001 From: Rob Zolkos Date: Fri, 2 Feb 2024 17:15:12 +0000 Subject: [PATCH 4/4] Fix lint issue --- app/models/account.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/account.rb b/app/models/account.rb index ac8e3131..0c34c0b3 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -1,7 +1,7 @@ class Account < ApplicationRecord VALID_ACCOUNT_TYPES = %w[Investment Depository Credit Loan Property Vehicle OtherAsset OtherLiability].freeze - + belongs_to :family - scope :depository, -> { where(type: 'Depository') } + scope :depository, -> { where(type: "Depository") } end