railties 8.0.2.1 → 8.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +15 -2
 - data/README.rdoc +1 -1
 - data/lib/rails/application/bootstrap.rb +1 -3
 - data/lib/rails/application/routes_reloader.rb +1 -1
 - data/lib/rails/application.rb +5 -1
 - data/lib/rails/application_controller.rb +2 -0
 - data/lib/rails/commands/console/irb_console.rb +2 -1
 - data/lib/rails/engine/lazy_route_set.rb +8 -11
 - data/lib/rails/gem_version.rb +2 -2
 - data/lib/rails/generators/app_base.rb +8 -28
 - data/lib/rails/generators/bundle_helper.rb +34 -0
 - data/lib/rails/generators/rails/app/app_generator.rb +2 -2
 - data/lib/rails/generators/rails/app/templates/Dockerfile.tt +1 -1
 - data/lib/rails/generators/rails/authentication/authentication_generator.rb +6 -4
 - data/lib/rails/generators/rails/devcontainer/devcontainer_generator.rb +1 -1
 - data/lib/rails/generators/rails/devcontainer/templates/devcontainer/devcontainer.json.tt +1 -1
 - data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +2 -2
 - data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +2 -2
 - data/lib/rails/generators/test_unit/authentication/authentication_generator.rb +4 -0
 - data/lib/rails/health_controller.rb +2 -0
 - data/lib/rails/info.rb +2 -1
 - data/lib/rails/templates/rails/mailers/email.html.erb +1 -1
 - metadata +26 -11
 - /data/lib/rails/generators/{rails → test_unit}/authentication/templates/test/mailers/previews/passwords_mailer_preview.rb.tt +0 -0
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: d8c2ed2dda05fe428f277697d487510ad5868df8e61e533ef22b542d1ec20d85
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 722bb78153fba3fc695ba82d3af3ea9be8cd325a8c0b628e889fc74444ef41a5
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 0dffa3edcc45448270a04b3635078513d3d71ebfd6764134c83a2c2721cf3195818ee53e2fa33c8b3f21ecfa7073e44304eb773cd2f52afbaaadad111fad60a4
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 4521490c8faa3ca6135e8837fb6de80dc6b892bf933fcec995444995d47456fe1ed1dec4715cc3079a5246fbffe145e7cc8077394973f1811c7824bfcbacb7a5
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,9 +1,22 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            ## Rails 8.0. 
     | 
| 
      
 1 
     | 
    
         
            +
            ## Rails 8.0.4 (October 28, 2025) ##
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            *   No changes.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
            ## Rails 8.0. 
     | 
| 
      
 6 
     | 
    
         
            +
            ## Rails 8.0.3 (September 22, 2025) ##
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            *   Fix `polymorphic_url` and `polymorphic_path` not working when routes are not loaded.
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                *Édouard Chin*
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            *   Fix Rails console to not override user defined IRB_NAME.
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                Only change the prompt name if it hasn't been customized in `.irbrc`.
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                *Jarrett Lusso*
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            ## Rails 8.0.2.1 (August 13, 2025) ##
         
     | 
| 
       7 
20 
     | 
    
         | 
| 
       8 
21 
     | 
    
         
             
            *   No changes.
         
     | 
| 
       9 
22 
     | 
    
         | 
    
        data/README.rdoc
    CHANGED
    
    | 
         @@ -34,6 +34,6 @@ Bug reports can be filed for the Ruby on \Rails project here: 
     | 
|
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
            * https://github.com/rails/rails/issues
         
     | 
| 
       36 
36 
     | 
    
         | 
| 
       37 
     | 
    
         
            -
            Feature requests should be discussed on the  
     | 
| 
      
 37 
     | 
    
         
            +
            Feature requests should be discussed on the rubyonrails-core forum here:
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
39 
     | 
    
         
             
            * https://discuss.rubyonrails.org/c/rubyonrails-core
         
     | 
| 
         @@ -59,9 +59,7 @@ module Rails 
     | 
|
| 
       59 
59 
     | 
    
         
             
                      end
         
     | 
| 
       60 
60 
     | 
    
         
             
                    else
         
     | 
| 
       61 
61 
     | 
    
         
             
                      Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase)
         
     | 
| 
       62 
     | 
    
         
            -
                       
     | 
| 
       63 
     | 
    
         
            -
                      broadcast_logger.formatter = Rails.logger.formatter
         
     | 
| 
       64 
     | 
    
         
            -
                      Rails.logger = broadcast_logger
         
     | 
| 
      
 62 
     | 
    
         
            +
                      Rails.logger = ActiveSupport::BroadcastLogger.new(Rails.logger)
         
     | 
| 
       65 
63 
     | 
    
         
             
                    end
         
     | 
| 
       66 
64 
     | 
    
         
             
                  end
         
     | 
| 
       67 
65 
     | 
    
         | 
| 
         @@ -9,7 +9,7 @@ module Rails 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                  attr_reader :route_sets, :paths, :external_routes, :loaded
         
     | 
| 
       11 
11 
     | 
    
         
             
                  attr_accessor :eager_load
         
     | 
| 
       12 
     | 
    
         
            -
                  attr_writer :run_after_load_paths # :nodoc:
         
     | 
| 
      
 12 
     | 
    
         
            +
                  attr_writer :run_after_load_paths, :loaded # :nodoc:
         
     | 
| 
       13 
13 
     | 
    
         
             
                  delegate :execute_if_updated, :updated?, to: :updater
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
                  def initialize
         
     | 
    
        data/lib/rails/application.rb
    CHANGED
    
    | 
         @@ -158,7 +158,11 @@ module Rails 
     | 
|
| 
       158 
158 
     | 
    
         | 
| 
       159 
159 
     | 
    
         
             
                # Reload application routes regardless if they changed or not.
         
     | 
| 
       160 
160 
     | 
    
         
             
                def reload_routes!
         
     | 
| 
       161 
     | 
    
         
            -
                  routes_reloader. 
     | 
| 
      
 161 
     | 
    
         
            +
                  if routes_reloader.execute_unless_loaded
         
     | 
| 
      
 162 
     | 
    
         
            +
                    routes_reloader.loaded = false
         
     | 
| 
      
 163 
     | 
    
         
            +
                  else
         
     | 
| 
      
 164 
     | 
    
         
            +
                    routes_reloader.reload!
         
     | 
| 
      
 165 
     | 
    
         
            +
                  end
         
     | 
| 
       162 
166 
     | 
    
         
             
                end
         
     | 
| 
       163 
167 
     | 
    
         | 
| 
       164 
168 
     | 
    
         
             
                def reload_routes_unless_loaded # :nodoc:
         
     | 
| 
         @@ -87,7 +87,8 @@ module Rails 
     | 
|
| 
       87 
87 
     | 
    
         | 
| 
       88 
88 
     | 
    
         
             
                    env = colorized_env
         
     | 
| 
       89 
89 
     | 
    
         
             
                    prompt_prefix = "%N(#{env})"
         
     | 
| 
       90 
     | 
    
         
            -
                     
     | 
| 
      
 90 
     | 
    
         
            +
                    # Respect user's configured irb name.
         
     | 
| 
      
 91 
     | 
    
         
            +
                    IRB.conf[:IRB_NAME] = @app.name if IRB.conf[:IRB_NAME] == "irb"
         
     | 
| 
       91 
92 
     | 
    
         | 
| 
       92 
93 
     | 
    
         
             
                    IRB.conf[:PROMPT][:RAILS_PROMPT] = {
         
     | 
| 
       93 
94 
     | 
    
         
             
                      PROMPT_I: "#{prompt_prefix}> ",
         
     | 
| 
         @@ -4,9 +4,11 @@ 
     | 
|
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            require "action_dispatch/routing/route_set"
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
      
 7 
     | 
    
         
            +
            # :enddoc:
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       7 
9 
     | 
    
         
             
            module Rails
         
     | 
| 
       8 
10 
     | 
    
         
             
              class Engine
         
     | 
| 
       9 
     | 
    
         
            -
                class LazyRouteSet < ActionDispatch::Routing::RouteSet 
     | 
| 
      
 11 
     | 
    
         
            +
                class LazyRouteSet < ActionDispatch::Routing::RouteSet
         
     | 
| 
       10 
12 
     | 
    
         
             
                  class NamedRouteCollection < ActionDispatch::Routing::RouteSet::NamedRouteCollection
         
     | 
| 
       11 
13 
     | 
    
         
             
                    def route_defined?(name)
         
     | 
| 
       12 
14 
     | 
    
         
             
                      Rails.application&.reload_routes_unless_loaded
         
     | 
| 
         @@ -34,16 +36,6 @@ module Rails 
     | 
|
| 
       34 
36 
     | 
    
         
             
                      Rails.application&.reload_routes_unless_loaded
         
     | 
| 
       35 
37 
     | 
    
         
             
                      super
         
     | 
| 
       36 
38 
     | 
    
         
             
                    end
         
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
                    def polymorphic_url(record_or_hash_or_array, options = {})
         
     | 
| 
       39 
     | 
    
         
            -
                      Rails.application&.reload_routes_unless_loaded
         
     | 
| 
       40 
     | 
    
         
            -
                      super
         
     | 
| 
       41 
     | 
    
         
            -
                    end
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                    def polymorphic_path(record_or_hash_or_array, options = {})
         
     | 
| 
       44 
     | 
    
         
            -
                      Rails.application&.reload_routes_unless_loaded
         
     | 
| 
       45 
     | 
    
         
            -
                      super
         
     | 
| 
       46 
     | 
    
         
            -
                    end
         
     | 
| 
       47 
39 
     | 
    
         
             
                  end
         
     | 
| 
       48 
40 
     | 
    
         | 
| 
       49 
41 
     | 
    
         
             
                  def initialize(config = DEFAULT_CONFIG)
         
     | 
| 
         @@ -68,6 +60,11 @@ module Rails 
     | 
|
| 
       68 
60 
     | 
    
         
             
                    super
         
     | 
| 
       69 
61 
     | 
    
         
             
                  end
         
     | 
| 
       70 
62 
     | 
    
         | 
| 
      
 63 
     | 
    
         
            +
                  def polymorphic_mappings
         
     | 
| 
      
 64 
     | 
    
         
            +
                    Rails.application&.reload_routes_unless_loaded
         
     | 
| 
      
 65 
     | 
    
         
            +
                    super
         
     | 
| 
      
 66 
     | 
    
         
            +
                  end
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
       71 
68 
     | 
    
         
             
                  def draw(&block)
         
     | 
| 
       72 
69 
     | 
    
         
             
                    Rails.application&.reload_routes_unless_loaded
         
     | 
| 
       73 
70 
     | 
    
         
             
                    super
         
     | 
    
        data/lib/rails/gem_version.rb
    CHANGED
    
    
| 
         @@ -7,12 +7,14 @@ require "open-uri" 
     | 
|
| 
       7 
7 
     | 
    
         
             
            require "tsort"
         
     | 
| 
       8 
8 
     | 
    
         
             
            require "uri"
         
     | 
| 
       9 
9 
     | 
    
         
             
            require "rails/generators"
         
     | 
| 
      
 10 
     | 
    
         
            +
            require "rails/generators/bundle_helper"
         
     | 
| 
       10 
11 
     | 
    
         
             
            require "active_support/core_ext/array/extract_options"
         
     | 
| 
       11 
12 
     | 
    
         | 
| 
       12 
13 
     | 
    
         
             
            module Rails
         
     | 
| 
       13 
14 
     | 
    
         
             
              module Generators
         
     | 
| 
       14 
15 
     | 
    
         
             
                class AppBase < Base # :nodoc:
         
     | 
| 
       15 
16 
     | 
    
         
             
                  include AppName
         
     | 
| 
      
 17 
     | 
    
         
            +
                  include BundleHelper
         
     | 
| 
       16 
18 
     | 
    
         | 
| 
       17 
19 
     | 
    
         
             
                  NODE_LTS_VERSION = "20.11.1"
         
     | 
| 
       18 
20 
     | 
    
         
             
                  BUN_VERSION = "1.0.1"
         
     | 
| 
         @@ -642,32 +644,6 @@ module Rails 
     | 
|
| 
       642 
644 
     | 
    
         
             
                    end
         
     | 
| 
       643 
645 
     | 
    
         
             
                  end
         
     | 
| 
       644 
646 
     | 
    
         | 
| 
       645 
     | 
    
         
            -
                  def bundle_command(command, env = {})
         
     | 
| 
       646 
     | 
    
         
            -
                    say_status :run, "bundle #{command}"
         
     | 
| 
       647 
     | 
    
         
            -
             
     | 
| 
       648 
     | 
    
         
            -
                    # We are going to shell out rather than invoking Bundler::CLI.new(command)
         
     | 
| 
       649 
     | 
    
         
            -
                    # because `rails new` loads the Thor gem and on the other hand bundler uses
         
     | 
| 
       650 
     | 
    
         
            -
                    # its own vendored Thor, which could be a different version. Running both
         
     | 
| 
       651 
     | 
    
         
            -
                    # things in the same process is a recipe for a night with paracetamol.
         
     | 
| 
       652 
     | 
    
         
            -
                    #
         
     | 
| 
       653 
     | 
    
         
            -
                    # Thanks to James Tucker for the Gem tricks involved in this call.
         
     | 
| 
       654 
     | 
    
         
            -
                    _bundle_command = Gem.bin_path("bundler", "bundle")
         
     | 
| 
       655 
     | 
    
         
            -
             
     | 
| 
       656 
     | 
    
         
            -
                    require "bundler"
         
     | 
| 
       657 
     | 
    
         
            -
                    Bundler.with_original_env do
         
     | 
| 
       658 
     | 
    
         
            -
                      exec_bundle_command(_bundle_command, command, env)
         
     | 
| 
       659 
     | 
    
         
            -
                    end
         
     | 
| 
       660 
     | 
    
         
            -
                  end
         
     | 
| 
       661 
     | 
    
         
            -
             
     | 
| 
       662 
     | 
    
         
            -
                  def exec_bundle_command(bundle_command, command, env)
         
     | 
| 
       663 
     | 
    
         
            -
                    full_command = %Q["#{Gem.ruby}" "#{bundle_command}" #{command}]
         
     | 
| 
       664 
     | 
    
         
            -
                    if options[:quiet]
         
     | 
| 
       665 
     | 
    
         
            -
                      system(env, full_command, out: File::NULL)
         
     | 
| 
       666 
     | 
    
         
            -
                    else
         
     | 
| 
       667 
     | 
    
         
            -
                      system(env, full_command)
         
     | 
| 
       668 
     | 
    
         
            -
                    end
         
     | 
| 
       669 
     | 
    
         
            -
                  end
         
     | 
| 
       670 
     | 
    
         
            -
             
     | 
| 
       671 
647 
     | 
    
         
             
                  def bundle_install?
         
     | 
| 
       672 
648 
     | 
    
         
             
                    !(options[:skip_bundle] || options[:pretend])
         
     | 
| 
       673 
649 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -677,7 +653,7 @@ module Rails 
     | 
|
| 
       677 
653 
     | 
    
         
             
                  end
         
     | 
| 
       678 
654 
     | 
    
         | 
| 
       679 
655 
     | 
    
         
             
                  def depend_on_bootsnap?
         
     | 
| 
       680 
     | 
    
         
            -
                    !options[:skip_bootsnap] && !options[:dev] && ! 
     | 
| 
      
 656 
     | 
    
         
            +
                    !options[:skip_bootsnap] && !options[:dev] && !jruby?
         
     | 
| 
       681 
657 
     | 
    
         
             
                  end
         
     | 
| 
       682 
658 
     | 
    
         | 
| 
       683 
659 
     | 
    
         
             
                  def target_rails_prerelease(self_command = "new")
         
     | 
| 
         @@ -753,7 +729,7 @@ module Rails 
     | 
|
| 
       753 
729 
     | 
    
         
             
                  end
         
     | 
| 
       754 
730 
     | 
    
         | 
| 
       755 
731 
     | 
    
         
             
                  def add_bundler_platforms
         
     | 
| 
       756 
     | 
    
         
            -
                    if bundle_install?
         
     | 
| 
      
 732 
     | 
    
         
            +
                    if bundle_install? && !jruby?
         
     | 
| 
       757 
733 
     | 
    
         
             
                      # The vast majority of Rails apps will be deployed on `x86_64-linux`.
         
     | 
| 
       758 
734 
     | 
    
         
             
                      bundle_command("lock --add-platform=x86_64-linux")
         
     | 
| 
       759 
735 
     | 
    
         | 
| 
         @@ -768,6 +744,10 @@ module Rails 
     | 
|
| 
       768 
744 
     | 
    
         
             
                    end
         
     | 
| 
       769 
745 
     | 
    
         
             
                  end
         
     | 
| 
       770 
746 
     | 
    
         | 
| 
      
 747 
     | 
    
         
            +
                  def jruby?
         
     | 
| 
      
 748 
     | 
    
         
            +
                    defined?(JRUBY_VERSION)
         
     | 
| 
      
 749 
     | 
    
         
            +
                  end
         
     | 
| 
      
 750 
     | 
    
         
            +
             
     | 
| 
       771 
751 
     | 
    
         
             
                  def empty_directory_with_keep_file(destination, config = {})
         
     | 
| 
       772 
752 
     | 
    
         
             
                    empty_directory(destination, config)
         
     | 
| 
       773 
753 
     | 
    
         
             
                    keep_file(destination)
         
     | 
| 
         @@ -0,0 +1,34 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Rails
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Generators
         
     | 
| 
      
 5 
     | 
    
         
            +
                module BundleHelper # :nodoc:
         
     | 
| 
      
 6 
     | 
    
         
            +
                  def bundle_command(command, env = {}, params = {})
         
     | 
| 
      
 7 
     | 
    
         
            +
                    say_status :run, "bundle #{command}"
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                    # We are going to shell out rather than invoking Bundler::CLI.new(command)
         
     | 
| 
      
 10 
     | 
    
         
            +
                    # because `rails new` loads the Thor gem and on the other hand bundler uses
         
     | 
| 
      
 11 
     | 
    
         
            +
                    # its own vendored Thor, which could be a different version. Running both
         
     | 
| 
      
 12 
     | 
    
         
            +
                    # things in the same process is a recipe for a night with paracetamol.
         
     | 
| 
      
 13 
     | 
    
         
            +
                    #
         
     | 
| 
      
 14 
     | 
    
         
            +
                    # Thanks to James Tucker for the Gem tricks involved in this call.
         
     | 
| 
      
 15 
     | 
    
         
            +
                    _bundle_command = Gem.bin_path("bundler", "bundle")
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                    require "bundler"
         
     | 
| 
      
 18 
     | 
    
         
            +
                    Bundler.with_original_env do
         
     | 
| 
      
 19 
     | 
    
         
            +
                      exec_bundle_command(_bundle_command, command, env, params)
         
     | 
| 
      
 20 
     | 
    
         
            +
                    end
         
     | 
| 
      
 21 
     | 
    
         
            +
                  end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                  private
         
     | 
| 
      
 24 
     | 
    
         
            +
                    def exec_bundle_command(bundle_command, command, env, params)
         
     | 
| 
      
 25 
     | 
    
         
            +
                      full_command = %Q["#{Gem.ruby}" "#{bundle_command}" #{command}]
         
     | 
| 
      
 26 
     | 
    
         
            +
                      if options[:quiet] || params[:quiet]
         
     | 
| 
      
 27 
     | 
    
         
            +
                        system(env, full_command, out: File::NULL)
         
     | 
| 
      
 28 
     | 
    
         
            +
                      else
         
     | 
| 
      
 29 
     | 
    
         
            +
                        system(env, full_command)
         
     | 
| 
      
 30 
     | 
    
         
            +
                      end
         
     | 
| 
      
 31 
     | 
    
         
            +
                    end
         
     | 
| 
      
 32 
     | 
    
         
            +
                end
         
     | 
| 
      
 33 
     | 
    
         
            +
              end
         
     | 
| 
      
 34 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -272,9 +272,9 @@ module Rails 
     | 
|
| 
       272 
272 
     | 
    
         
             
                    dev: options[:dev],
         
     | 
| 
       273 
273 
     | 
    
         
             
                    node: using_node?,
         
     | 
| 
       274 
274 
     | 
    
         
             
                    app_name: app_name,
         
     | 
| 
       275 
     | 
    
         
            -
                    skip_solid: options[:skip_solid]
         
     | 
| 
      
 275 
     | 
    
         
            +
                    skip_solid: options[:skip_solid],
         
     | 
| 
      
 276 
     | 
    
         
            +
                    pretend: options[:pretend]
         
     | 
| 
       276 
277 
     | 
    
         
             
                  }
         
     | 
| 
       277 
     | 
    
         
            -
             
     | 
| 
       278 
278 
     | 
    
         
             
                  Rails::Generators::DevcontainerGenerator.new([], devcontainer_options).invoke_all
         
     | 
| 
       279 
279 
     | 
    
         
             
                end
         
     | 
| 
       280 
280 
     | 
    
         
             
              end
         
     | 
| 
         @@ -1,8 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            require "rails/generators/bundle_helper"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
       3 
5 
     | 
    
         
             
            module Rails
         
     | 
| 
       4 
6 
     | 
    
         
             
              module Generators
         
     | 
| 
       5 
7 
     | 
    
         
             
                class AuthenticationGenerator < Base # :nodoc:
         
     | 
| 
      
 8 
     | 
    
         
            +
                  include BundleHelper
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
       6 
10 
     | 
    
         
             
                  class_option :api, type: :boolean,
         
     | 
| 
       7 
11 
     | 
    
         
             
                    desc: "Generate API-only controllers and models, with no view templates"
         
     | 
| 
       8 
12 
     | 
    
         | 
| 
         @@ -25,8 +29,6 @@ module Rails 
     | 
|
| 
       25 
29 
     | 
    
         | 
| 
       26 
30 
     | 
    
         
             
                    template "app/views/passwords_mailer/reset.html.erb"
         
     | 
| 
       27 
31 
     | 
    
         
             
                    template "app/views/passwords_mailer/reset.text.erb"
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
                    template "test/mailers/previews/passwords_mailer_preview.rb"
         
     | 
| 
       30 
32 
     | 
    
         
             
                  end
         
     | 
| 
       31 
33 
     | 
    
         | 
| 
       32 
34 
     | 
    
         
             
                  def configure_application_controller
         
     | 
| 
         @@ -41,9 +43,9 @@ module Rails 
     | 
|
| 
       41 
43 
     | 
    
         
             
                  def enable_bcrypt
         
     | 
| 
       42 
44 
     | 
    
         
             
                    if File.read("Gemfile").include?('gem "bcrypt"')
         
     | 
| 
       43 
45 
     | 
    
         
             
                      uncomment_lines "Gemfile", /gem "bcrypt"/
         
     | 
| 
       44 
     | 
    
         
            -
                       
     | 
| 
      
 46 
     | 
    
         
            +
                      bundle_command("install --quiet")
         
     | 
| 
       45 
47 
     | 
    
         
             
                    else
         
     | 
| 
       46 
     | 
    
         
            -
                       
     | 
| 
      
 48 
     | 
    
         
            +
                      bundle_command("add bcrypt", {}, quiet: true)
         
     | 
| 
       47 
49 
     | 
    
         
             
                    end
         
     | 
| 
       48 
50 
     | 
    
         
             
                  end
         
     | 
| 
       49 
51 
     | 
    
         | 
| 
         @@ -112,7 +112,7 @@ module Rails 
     | 
|
| 
       112 
112 
     | 
    
         | 
| 
       113 
113 
     | 
    
         
             
                      @features["ghcr.io/rails/devcontainer/features/activestorage"] = {} if options[:active_storage]
         
     | 
| 
       114 
114 
     | 
    
         
             
                      @features["ghcr.io/devcontainers/features/node:1"] = {} if options[:node]
         
     | 
| 
       115 
     | 
    
         
            -
                      @features["ghcr.io/devcontainers/features/docker-outside-of-docker:1"] = {} if options[:kamal]
         
     | 
| 
      
 115 
     | 
    
         
            +
                      @features["ghcr.io/devcontainers/features/docker-outside-of-docker:1"] = { moby: false } if options[:kamal]
         
     | 
| 
       116 
116 
     | 
    
         | 
| 
       117 
117 
     | 
    
         
             
                      @features.merge!(database.feature) if database.feature
         
     | 
| 
       118 
118 
     | 
    
         | 
| 
         @@ -8,7 +8,7 @@ 
     | 
|
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
              // Features to add to the dev container. More info: https://containers.dev/features.
         
     | 
| 
       10 
10 
     | 
    
         
             
              "features": {
         
     | 
| 
       11 
     | 
    
         
            -
                <%= features.map { |key, value| "\"#{key}\": #{value. 
     | 
| 
      
 11 
     | 
    
         
            +
                <%= features.map { |key, value| "\"#{key}\": #{value.to_json}" }.join(",\n    ") %>
         
     | 
| 
       12 
12 
     | 
    
         
             
              },
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
            <%- if !container_env.empty? -%>
         
     | 
| 
         @@ -21,7 +21,7 @@ class <%= controller_class_name %>Controller < ApplicationController 
     | 
|
| 
       21 
21 
     | 
    
         
             
                if @<%= orm_instance.save %>
         
     | 
| 
       22 
22 
     | 
    
         
             
                  render json: <%= "@#{singular_table_name}" %>, status: :created, location: <%= "@#{singular_table_name}" %>
         
     | 
| 
       23 
23 
     | 
    
         
             
                else
         
     | 
| 
       24 
     | 
    
         
            -
                  render json: <%= "@#{orm_instance.errors}" %>, status:  
     | 
| 
      
 24 
     | 
    
         
            +
                  render json: <%= "@#{orm_instance.errors}" %>, status: <%= ActionDispatch::Constants::UNPROCESSABLE_CONTENT.inspect %>
         
     | 
| 
       25 
25 
     | 
    
         
             
                end
         
     | 
| 
       26 
26 
     | 
    
         
             
              end
         
     | 
| 
       27 
27 
     | 
    
         | 
| 
         @@ -30,7 +30,7 @@ class <%= controller_class_name %>Controller < ApplicationController 
     | 
|
| 
       30 
30 
     | 
    
         
             
                if @<%= orm_instance.update("#{singular_table_name}_params") %>
         
     | 
| 
       31 
31 
     | 
    
         
             
                  render json: <%= "@#{singular_table_name}" %>
         
     | 
| 
       32 
32 
     | 
    
         
             
                else
         
     | 
| 
       33 
     | 
    
         
            -
                  render json: <%= "@#{orm_instance.errors}" %>, status:  
     | 
| 
      
 33 
     | 
    
         
            +
                  render json: <%= "@#{orm_instance.errors}" %>, status: <%= ActionDispatch::Constants::UNPROCESSABLE_CONTENT.inspect %>
         
     | 
| 
       34 
34 
     | 
    
         
             
                end
         
     | 
| 
       35 
35 
     | 
    
         
             
              end
         
     | 
| 
       36 
36 
     | 
    
         | 
| 
         @@ -27,7 +27,7 @@ class <%= controller_class_name %>Controller < ApplicationController 
     | 
|
| 
       27 
27 
     | 
    
         
             
                if @<%= orm_instance.save %>
         
     | 
| 
       28 
28 
     | 
    
         
             
                  redirect_to <%= redirect_resource_name %>, notice: <%= %("#{human_name} was successfully created.") %>
         
     | 
| 
       29 
29 
     | 
    
         
             
                else
         
     | 
| 
       30 
     | 
    
         
            -
                  render :new, status:  
     | 
| 
      
 30 
     | 
    
         
            +
                  render :new, status: <%= ActionDispatch::Constants::UNPROCESSABLE_CONTENT.inspect %>
         
     | 
| 
       31 
31 
     | 
    
         
             
                end
         
     | 
| 
       32 
32 
     | 
    
         
             
              end
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
         @@ -36,7 +36,7 @@ class <%= controller_class_name %>Controller < ApplicationController 
     | 
|
| 
       36 
36 
     | 
    
         
             
                if @<%= orm_instance.update("#{singular_table_name}_params") %>
         
     | 
| 
       37 
37 
     | 
    
         
             
                  redirect_to <%= redirect_resource_name %>, notice: <%= %("#{human_name} was successfully updated.") %>, status: :see_other
         
     | 
| 
       38 
38 
     | 
    
         
             
                else
         
     | 
| 
       39 
     | 
    
         
            -
                  render :edit, status:  
     | 
| 
      
 39 
     | 
    
         
            +
                  render :edit, status: <%= ActionDispatch::Constants::UNPROCESSABLE_CONTENT.inspect %>
         
     | 
| 
       40 
40 
     | 
    
         
             
                end
         
     | 
| 
       41 
41 
     | 
    
         
             
              end
         
     | 
| 
       42 
42 
     | 
    
         | 
| 
         @@ -9,6 +9,10 @@ module TestUnit # :nodoc: 
     | 
|
| 
       9 
9 
     | 
    
         
             
                    template "test/fixtures/users.yml"
         
     | 
| 
       10 
10 
     | 
    
         
             
                    template "test/models/user_test.rb"
         
     | 
| 
       11 
11 
     | 
    
         
             
                  end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                  def create_mailer_preview_files
         
     | 
| 
      
 14 
     | 
    
         
            +
                    template "test/mailers/previews/passwords_mailer_preview.rb" if defined?(ActionMailer::Railtie)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  end
         
     | 
| 
       12 
16 
     | 
    
         
             
                end
         
     | 
| 
       13 
17 
     | 
    
         
             
              end
         
     | 
| 
       14 
18 
     | 
    
         
             
            end
         
     | 
    
        data/lib/rails/info.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: railties
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 8.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 8.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - David Heinemeier Hansson
         
     | 
| 
         @@ -15,28 +15,28 @@ dependencies: 
     | 
|
| 
       15 
15 
     | 
    
         
             
                requirements:
         
     | 
| 
       16 
16 
     | 
    
         
             
                - - '='
         
     | 
| 
       17 
17 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       18 
     | 
    
         
            -
                    version: 8.0. 
     | 
| 
      
 18 
     | 
    
         
            +
                    version: 8.0.4
         
     | 
| 
       19 
19 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       20 
20 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       21 
21 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       22 
22 
     | 
    
         
             
                requirements:
         
     | 
| 
       23 
23 
     | 
    
         
             
                - - '='
         
     | 
| 
       24 
24 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       25 
     | 
    
         
            -
                    version: 8.0. 
     | 
| 
      
 25 
     | 
    
         
            +
                    version: 8.0.4
         
     | 
| 
       26 
26 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       27 
27 
     | 
    
         
             
              name: actionpack
         
     | 
| 
       28 
28 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       29 
29 
     | 
    
         
             
                requirements:
         
     | 
| 
       30 
30 
     | 
    
         
             
                - - '='
         
     | 
| 
       31 
31 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       32 
     | 
    
         
            -
                    version: 8.0. 
     | 
| 
      
 32 
     | 
    
         
            +
                    version: 8.0.4
         
     | 
| 
       33 
33 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       34 
34 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       35 
35 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       36 
36 
     | 
    
         
             
                requirements:
         
     | 
| 
       37 
37 
     | 
    
         
             
                - - '='
         
     | 
| 
       38 
38 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       39 
     | 
    
         
            -
                    version: 8.0. 
     | 
| 
      
 39 
     | 
    
         
            +
                    version: 8.0.4
         
     | 
| 
       40 
40 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       41 
41 
     | 
    
         
             
              name: rackup
         
     | 
| 
       42 
42 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -113,20 +113,34 @@ dependencies: 
     | 
|
| 
       113 
113 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       114 
114 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       115 
115 
     | 
    
         
             
                    version: '1.13'
         
     | 
| 
      
 116 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 117 
     | 
    
         
            +
              name: tsort
         
     | 
| 
      
 118 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 119 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 120 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 121 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 122 
     | 
    
         
            +
                    version: '0.2'
         
     | 
| 
      
 123 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 124 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 125 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 126 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 127 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 128 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 129 
     | 
    
         
            +
                    version: '0.2'
         
     | 
| 
       116 
130 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       117 
131 
     | 
    
         
             
              name: actionview
         
     | 
| 
       118 
132 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       119 
133 
     | 
    
         
             
                requirements:
         
     | 
| 
       120 
134 
     | 
    
         
             
                - - '='
         
     | 
| 
       121 
135 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       122 
     | 
    
         
            -
                    version: 8.0. 
     | 
| 
      
 136 
     | 
    
         
            +
                    version: 8.0.4
         
     | 
| 
       123 
137 
     | 
    
         
             
              type: :development
         
     | 
| 
       124 
138 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       125 
139 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       126 
140 
     | 
    
         
             
                requirements:
         
     | 
| 
       127 
141 
     | 
    
         
             
                - - '='
         
     | 
| 
       128 
142 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       129 
     | 
    
         
            -
                    version: 8.0. 
     | 
| 
      
 143 
     | 
    
         
            +
                    version: 8.0.4
         
     | 
| 
       130 
144 
     | 
    
         
             
            description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
         
     | 
| 
       131 
145 
     | 
    
         
             
            email: david@loudthinking.com
         
     | 
| 
       132 
146 
     | 
    
         
             
            executables:
         
     | 
| 
         @@ -222,6 +236,7 @@ files: 
     | 
|
| 
       222 
236 
     | 
    
         
             
            - lib/rails/generators/app_base.rb
         
     | 
| 
       223 
237 
     | 
    
         
             
            - lib/rails/generators/app_name.rb
         
     | 
| 
       224 
238 
     | 
    
         
             
            - lib/rails/generators/base.rb
         
     | 
| 
      
 239 
     | 
    
         
            +
            - lib/rails/generators/bundle_helper.rb
         
     | 
| 
       225 
240 
     | 
    
         
             
            - lib/rails/generators/database.rb
         
     | 
| 
       226 
241 
     | 
    
         
             
            - lib/rails/generators/erb.rb
         
     | 
| 
       227 
242 
     | 
    
         
             
            - lib/rails/generators/erb/authentication/authentication_generator.rb
         
     | 
| 
         @@ -327,7 +342,6 @@ files: 
     | 
|
| 
       327 
342 
     | 
    
         
             
            - lib/rails/generators/rails/authentication/templates/app/models/user.rb.tt
         
     | 
| 
       328 
343 
     | 
    
         
             
            - lib/rails/generators/rails/authentication/templates/app/views/passwords_mailer/reset.html.erb.tt
         
     | 
| 
       329 
344 
     | 
    
         
             
            - lib/rails/generators/rails/authentication/templates/app/views/passwords_mailer/reset.text.erb.tt
         
     | 
| 
       330 
     | 
    
         
            -
            - lib/rails/generators/rails/authentication/templates/test/mailers/previews/passwords_mailer_preview.rb.tt
         
     | 
| 
       331 
345 
     | 
    
         
             
            - lib/rails/generators/rails/benchmark/USAGE
         
     | 
| 
       332 
346 
     | 
    
         
             
            - lib/rails/generators/rails/benchmark/benchmark_generator.rb
         
     | 
| 
       333 
347 
     | 
    
         
             
            - lib/rails/generators/rails/benchmark/templates/benchmark.rb.tt
         
     | 
| 
         @@ -412,6 +426,7 @@ files: 
     | 
|
| 
       412 
426 
     | 
    
         
             
            - lib/rails/generators/test_unit.rb
         
     | 
| 
       413 
427 
     | 
    
         
             
            - lib/rails/generators/test_unit/authentication/authentication_generator.rb
         
     | 
| 
       414 
428 
     | 
    
         
             
            - lib/rails/generators/test_unit/authentication/templates/test/fixtures/users.yml.tt
         
     | 
| 
      
 429 
     | 
    
         
            +
            - lib/rails/generators/test_unit/authentication/templates/test/mailers/previews/passwords_mailer_preview.rb.tt
         
     | 
| 
       415 
430 
     | 
    
         
             
            - lib/rails/generators/test_unit/authentication/templates/test/models/user_test.rb.tt
         
     | 
| 
       416 
431 
     | 
    
         
             
            - lib/rails/generators/test_unit/controller/controller_generator.rb
         
     | 
| 
       417 
432 
     | 
    
         
             
            - lib/rails/generators/test_unit/controller/templates/functional_test.rb.tt
         
     | 
| 
         @@ -490,10 +505,10 @@ licenses: 
     | 
|
| 
       490 
505 
     | 
    
         
             
            - MIT
         
     | 
| 
       491 
506 
     | 
    
         
             
            metadata:
         
     | 
| 
       492 
507 
     | 
    
         
             
              bug_tracker_uri: https://github.com/rails/rails/issues
         
     | 
| 
       493 
     | 
    
         
            -
              changelog_uri: https://github.com/rails/rails/blob/v8.0. 
     | 
| 
       494 
     | 
    
         
            -
              documentation_uri: https://api.rubyonrails.org/v8.0. 
     | 
| 
      
 508 
     | 
    
         
            +
              changelog_uri: https://github.com/rails/rails/blob/v8.0.4/railties/CHANGELOG.md
         
     | 
| 
      
 509 
     | 
    
         
            +
              documentation_uri: https://api.rubyonrails.org/v8.0.4/
         
     | 
| 
       495 
510 
     | 
    
         
             
              mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
         
     | 
| 
       496 
     | 
    
         
            -
              source_code_uri: https://github.com/rails/rails/tree/v8.0. 
     | 
| 
      
 511 
     | 
    
         
            +
              source_code_uri: https://github.com/rails/rails/tree/v8.0.4/railties
         
     | 
| 
       497 
512 
     | 
    
         
             
              rubygems_mfa_required: 'true'
         
     | 
| 
       498 
513 
     | 
    
         
             
            rdoc_options:
         
     | 
| 
       499 
514 
     | 
    
         
             
            - "--exclude"
         
     |