diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6af43c2..db04fb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,24 +33,6 @@ jobs: - name: Run tests run: bin/test - rails6: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: rm Gemfile.lock - - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.2" - bundler: latest - - name: "Pin to Rails 6.1" - run: | - bundle remove actionmailer - bundle add actionmailer --version "~> 6.1" --skip-install - bundle add railties --version "~> 6.1" --skip-install - bundle install - - name: Run tests - run: bin/test - user-journey: strategy: fail-fast: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e9718e..e0db08d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ ## unreleased -* Bring the scaffold templates up to date with rails/rails as much as possible without breaking 6.1 compatibility. (#357) @kinsomicrote +* Bring the scaffold templates up to date with rails/rails. (#357, #359) @kinsomicrote * Drop support for Rails 6.0, which reached end-of-life in June 2023. +* Drop feature and bug fix support for Rails 6.1. The previous minor release will still receive security support while Rails 6.1 is supported. ## v2.5.0 / 2024-04-27 diff --git a/Gemfile b/Gemfile index 7a21e10..4678889 100644 --- a/Gemfile +++ b/Gemfile @@ -5,5 +5,5 @@ gemspec gem "debug", ">= 1.0.0" group :test do - gem "actionmailer", ">= 6.1.0" + gem "actionmailer", ">= 7.0.0" end diff --git a/Gemfile.lock b/Gemfile.lock index 75b2437..0b99151 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: tailwindcss-rails (2.5.0) - railties (>= 6.1.0) + railties (>= 7.0.0) GEM remote: https://rubygems.org/ @@ -141,7 +141,7 @@ PLATFORMS x86_64-linux DEPENDENCIES - actionmailer (>= 6.1.0) + actionmailer (>= 7.0.0) debug (>= 1.0.0) tailwindcss-rails! diff --git a/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt index a1e3772..fab779d 100644 --- a/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt +++ b/lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt @@ -4,5 +4,5 @@ <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %> <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> - <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> + <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> diff --git a/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt index f0a4bb9..65cf06b 100644 --- a/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt +++ b/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt @@ -14,7 +14,7 @@ <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> <%%= render <%= singular_table_name %> %>

- <%%= link_to "Show this <%= human_name.downcase %>", <%= singular_name %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> + <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>

<%% end %> diff --git a/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt index 61c0a45..665532e 100644 --- a/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt +++ b/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt @@ -3,5 +3,5 @@ <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %> - <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> + <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> diff --git a/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt index fafb05a..17d0feb 100644 --- a/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt +++ b/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt @@ -6,7 +6,7 @@ <%%= render @<%= singular_table_name %> %> - <%%= link_to "Edit this <%= human_name.downcase %>", edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> + <%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %> diff --git a/tailwindcss-rails.gemspec b/tailwindcss-rails.gemspec index 237161f..7535ccc 100644 --- a/tailwindcss-rails.gemspec +++ b/tailwindcss-rails.gemspec @@ -20,5 +20,5 @@ Gem::Specification.new do |spec| spec.bindir = "exe" spec.executables << "tailwindcss" - spec.add_dependency "railties", ">= 6.1.0" + spec.add_dependency "railties", ">= 7.0.0" end