Skip to content

Commit

Permalink
Merge pull request #359 from rails/update-templates-to-rails-7.0
Browse files Browse the repository at this point in the history
generator: sync erb template to use Rails 7.0 APIs
  • Loading branch information
flavorjones committed May 2, 2024
2 parents d05daf4 + 3bf5cb9 commit cc22bca
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 27 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -5,5 +5,5 @@ gemspec
gem "debug", ">= 1.0.0"

group :test do
gem "actionmailer", ">= 6.1.0"
gem "actionmailer", ">= 7.0.0"
end
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -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/
Expand Down Expand Up @@ -141,7 +141,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
actionmailer (>= 6.1.0)
actionmailer (>= 7.0.0)
debug (>= 1.0.0)
tailwindcss-rails!

Expand Down
Expand Up @@ -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" %>
</div>
Expand Up @@ -14,7 +14,7 @@
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
<%%= render <%= singular_table_name %> %>
<p>
<%%= 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" %>
</p>
<%% end %>
</div>
Expand Down
Expand Up @@ -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" %>
</div>
Expand Up @@ -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" %>
<div class="inline-block ml-2">
<%%= 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" %>
Expand Down
2 changes: 1 addition & 1 deletion tailwindcss-rails.gemspec
Expand Up @@ -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

0 comments on commit cc22bca

Please sign in to comment.