1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/CHANGELOG.md
2022-06-20 00:06:39 -04:00

4.4 KiB

  • Add --skip-dev-gems option to app generator to skip adding development gems (like web-console) to the Gemfile.

    Brad Trick

  • Skip Active Storage and Action Mailer if Active Job is skipped.

    Étienne Barrié

  • Correctly check if frameworks are disabled when running app:update.

    Étienne Barrié and Paulo Barros

  • Delegate model generator description to orm hooked generator.

    Gannon McGibbon

  • Execute rails runner scripts inside the executor.

    Enables error reporting, query cache, etc.

    Jean Boussier

  • Avoid booting in development then test for test tasks.

    Running one of the rails test subtasks (e.g. test:system, test:models) would go through Rake and cause the app to be booted twice. Now all the test:* subtasks are defined as Thor tasks and directly load the test environment.

    Étienne Barrié

  • Deprecate Rails::Generators::Testing::Behaviour in favor of Rails::Generators::Testing::Behavior.

    Gannon McGibbon

  • Allow configuration of logger size for local and test environments

    config.log_file_size

    Defaults to 100 megabytes.

    Bernie Chiu

  • Enroll new apps in decrypted diffs of credentials by default. This behavior can be opted out of with the app generator's --skip-decrypted-diffs flag.

    Jonathan Hefner

  • Support declarative-style test name filters with bin/rails test.

    This makes it possible to run a declarative-style test such as:

    class MyTest < ActiveSupport::TestCase
      test "does something" do
        # ...
      end
    end
    

    Using its declared name:

    $ bin/rails test test/my_test.rb -n "does something"
    

    Instead of having to specify its expanded method name:

    $ bin/rails test test/my_test.rb -n test_does_something
    

    Jonathan Hefner

  • Add --js and --skip-javascript options to rails new

    --js alias to rails new --javascript ...

    Same as -j, e.g. rails new --js esbuild ...

    --skip-js alias to rails new --skip-javascript ...

    Same as -J, e.g. rails new --skip-js ...

    Dorian Marié

  • Allow relative paths with leading dot slash to be passed to rails test.

    Fix rails test ./test/model/post_test.rb to run a single test file.

    Shouichi Kamiya and oljfte

  • Deprecate config.enable_dependency_loading. This flag addressed a limitation of the classic autoloader and has no effect nowadays. To fix this deprecation, please just delete the reference.

    Xavier Noria

  • Define config.enable_reloading to be !config.cache_classes for a more intuitive name. While config.enable_reloading and config.reloading_enabled? are preferred from now on, config.cache_classes is supported for backwards compatibility.

    Xavier Noria

  • Add JavaScript dependencies installation on bin/setup

    Add yarn install to bin/setup when using esbuild, webpack, or rollout.

    Carlos Ribeiro

  • Use controller_class_path in Rails::Generators::NamedBase#route_url

    The route_url method now returns the correct path when generating a namespaced controller with a top-level model using --model-name.

    Previously, when running this command:

    bin/rails generate scaffold_controller Admin/Post --model-name Post
    

    the comments above the controller action would look like:

    # GET /posts
    def index
      @posts = Post.all
    end
    

    afterwards, they now look like this:

    # GET /admin/posts
    def index
      @posts = Post.all
    end
    

    Fixes #44662.

    Andrew White

  • No longer add autoloaded paths to $LOAD_PATH.

    This means it won't be possible to load them with a manual require call, the class or module can be referenced instead.

    Reducing the size of $LOAD_PATH speed-up require calls for apps not using bootsnap, and reduce the size of the bootsnap cache for the others.

    Jean Boussier

  • Remove default X-Download-Options header

    This header is currently only used by Internet Explorer which will be discontinued in 2022 and since Rails 7 does not fully support Internet Explorer this header should not be a default one.

    Harun Sabljaković

Please check 7-0-stable for previous changes.