CHANGELOG.md 4.7 KB
Newer Older
Y
Yves Senn 已提交
1
*   Remove `--skip-action-view` option from `Rails::Generators::AppBase`.
2 3 4 5 6

    Fixes #17023.

    *Dan Olson*

7 8 9 10 11 12
*   Specify dummy app's db migrate path in plugin's test_helper.rb.

    Fixes #16877.

    *Yukio Mizuta*

13 14 15 16 17 18
*   Inject `Rack::Lock` if `config.eager_load` is false.

    Fixes #15089.

    *Xavier Noria*

19 20 21 22 23
*   Change the path of dummy app location in plugin's test_helper.rb for cases
    you specify dummy_path option.

    *Yukio Mizuta*

24 25 26 27 28 29 30
*   Fix a bug in the `gem` method for Rails templates when non-String options
    are used.

    Fixes #16709.

    *Yves Senn*

31 32
*   The [web-console](https://github.com/rails/web-console) gem is now
    installed by default for new applications. It can help you debug
G
Guo Xiang Tan 已提交
33
    development exceptions by spawning an interactive console in its cause
34 35 36 37
    binding.

    *Ryan Dao*, *Genadi Samokovarov*, *Guillermo Iguaran*

38 39 40 41
*   Add a `required` option to the model generator for associations

    *Sean Griffin*

42 43 44 45 46 47 48
*   Add `after_bundle` callbacks in Rails templates. Useful for allowing the
    generated binstubs to be added to version control.

    Fixes #16292.

    *Stefan Kanev*

49 50 51 52
*   Pull in the custom configuration concept from dhh/custom_configuration, which allows you to
    configure your own code through the Rails configuration object with custom configuration:

        # config/environments/production.rb
53 54
        config.x.payment_processing.schedule = :daily
        config.x.payment_processing.retries  = 3
55
        config.x.super_debugger              = true
56 57 58

    These configuration points are then available through the configuration object:

59 60 61
        Rails.configuration.x.payment_processing.schedule # => :daily
        Rails.configuration.x.payment_processing.retries  # => 3
        Rails.configuration.x.super_debugger              # => true
62 63 64

    *DHH*

65 66 67 68 69
*   Scaffold generator `_form` partial adds `class="field"` for password
    confirmation fields.

    *noinkling*

70 71 72 73 74 75 76 77 78 79 80 81
*   Add `Rails::Application.config_for` to load a configuration for the current
    environment.

        # config/exception_notification.yml:
        production:
          url: http://127.0.0.1:8080
          namespace: my_app_production
        development:
          url: http://localhost:3001
          namespace: my_app_development

        # config/production.rb
82
        Rails.application.configure do
83 84 85 86 87
          config.middleware.use ExceptionNotifier, config_for(:exception_notification)
        end

    *Rafael Mendonça França*, *DHH*

88
*   Deprecate `Rails::Rack::LogTailer` without replacement.
89 90 91

    *Rafael Mendonça França*

92
*   Add a generic --skip-turbolinks options to generator.
93 94 95

    *Rafael Mendonça França*

96 97 98 99
*   Invalid `bin/rails generate` commands will now show spelling suggestions.

    *Richard Schneeman*

100 101 102 103
*   Add `bin/setup` script to bootstrap an application.

    *Yves Senn*

104 105 106 107
*   Replace double quotes with single quotes while adding an entry into Gemfile.

    *Alexander Belaev*

108 109 110 111
*   Default `config.assets.digest` to `true` in development.

    *Dan Kang*

Z
Zachary Scott 已提交
112
*   Load database configuration from the first `database.yml` available in paths.
113 114 115

    *Pier-Olivier Thibault*

116 117 118 119 120 121
*   Reading name and email from git for plugin gemspec.

    Fixes #9589.

    *Arun Agrawal*, *Abd ar-Rahman Hamidi*, *Roman Shmatov*

122 123 124 125 126 127
*   Fix `console` and `generators` blocks defined at different environments.

    Fixes #14748.

    *Rafael Mendonça França*

128 129 130 131
*   Move configuration of asset precompile list and version to an initializer.

    *Matthew Draper*

132
*   Remove sqlite3 lines from `.gitignore` if the application is not using sqlite3.
133 134 135

    *Dmitrii Golub*

R
robertomiranda 已提交
136 137 138 139 140 141 142 143
*   Add public API to register new extensions for `rake notes`.

    Example:

        config.annotations.register_extensions("scss", "sass") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ }

    *Roberto Miranda*

144 145 146 147
*   Removed unnecessary `rails application` command.

    *Arun Agrawal*

148 149 150 151 152 153
*   Make the `rails:template` rake task load the application's initializers.

    Fixes #12133.

    *Robin Dupret*

154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
*   Introduce `Rails.gem_version` as a convenience method to return
    `Gem::Version.new(Rails.version)`, suggesting a more reliable way to perform
    version comparison.

    Example:

        Rails.version #=> "4.1.2"
        Rails.gem_version #=> #<Gem::Version "4.1.2">

        Rails.version > "4.1.10" #=> false
        Rails.gem_version > Gem::Version.new("4.1.10") #=> true
        Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true

    *Prem Sichanugrist*

169 170 171 172 173 174 175 176 177
*   Avoid namespacing routes inside engines.

    Mountable engines are namespaced by default so the generated routes
    were too while they should not.

    Fixes #14079.

    *Yves Senn*, *Carlos Antonio da Silva*, *Robin Dupret*

178
Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/railties/CHANGELOG.md) for previous changes.