diff --git a/CHANGELOG.md b/CHANGELOG.md index 63d2e03c..b996fd78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## v2.7.9 / 2024-10-10 + +* Fix the scaffold form template to render text forms and check boxes properly in all versions of Rails. (#418) @Earlopain + + +## v2.7.8 / 2024-10-08 + +* Fix the scaffold form template to render checkboxes properly. (#416) @enderahmetyurt + + ## v2.7.7 / 2024-10-02 * Proactively support changes to Rails's authentication templates shipping in Rails 8.0.0.beta2 (which is not yet released). (#407, #408) @seanpdoyle @flavorjones diff --git a/Gemfile.lock b/Gemfile.lock index 922d259d..7ef04d57 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - tailwindcss-rails (2.7.6) + tailwindcss-rails (2.7.9) railties (>= 7.0.0) GEM diff --git a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt index 5ee5ecf0..487f2f5f 100644 --- a/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt +++ b/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt @@ -26,9 +26,9 @@ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %> <% else -%> <%%= form.label :<%= attribute.column_name %> %> -<% if attribute.field_type == :text_area -%> +<% if attribute.field_type == :textarea || attribute.field_type == :text_area -%> <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %> -<% elsif attribute.field_type == :check_box -%> +<% elsif attribute.field_type == :checkbox || attribute.field_type == :check_box -%> <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block mt-2 h-5 w-5" %> <% else -%> <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %> diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb index 6f849135..b0236c5b 100644 --- a/lib/tailwindcss/version.rb +++ b/lib/tailwindcss/version.rb @@ -1,3 +1,3 @@ module Tailwindcss - VERSION = "2.7.7" + VERSION = "2.7.9" end