Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generator: sync erb template to use Rails 7.0 APIs #359

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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>
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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>
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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