CHANGELOG.md 5.6 KB
Newer Older
S
Santiago Pastorino 已提交
1 2
## Rails 4.0.0 (unreleased) ##

3 4
*   The `public/index.html` is no longer generated for new projects.
    Page is replaced by internal `welcome_controller` inside of railties.
S
schneems 已提交
5 6 7

    *Richard Schneeman*

8
*   Add `ENV['RACK_ENV']` support to `rails runner/console/server`.
9 10

    *kennyj*
S
schneems 已提交
11

12 13
*   Add `db` to list of folders included by `rake notes` and `rake notes:custom`. *Antonio Cangiano*

14 15 16 17 18
*   Engines with a dummy app include the rake tasks of dependencies in the app namespace.
    Fix #8229

    *Yves Senn*

19
*   Add `sqlserver.yml` template file to satisfy `-d sqlserver` being passed to `rails new`.
20 21
    Fix #6882

22
    *Robert Nesius*
23

N
Nicolas Despres 已提交
24 25
*   Rake test:uncommitted finds git directory in ancestors *Nicolas Despres*

26
*   Add dummy app Rake tasks when `--skip-test-unit` and `--dummy-path` is passed to the plugin generator.
27 28 29 30
    Fix #8121

    *Yves Senn*

31
*   Ensure that `RAILS_ENV` is set when accessing Rails.env *Steve Klabnik*
32

33
*   Don't eager-load `app/assets` and `app/views` *Elia Schito*
34

35 36
*   Add `.rake` to list of file extensions included by `rake notes` and `rake notes:custom`. *Brent J. Nordquist*

M
Mike Moore 已提交
37 38 39
*   New test locations `test/models`, `test/helpers`, `test/controllers`, and
    `test/mailers`. Corresponding rake tasks added as well. *Mike Moore*

40
*   Set a different cache per environment for assets pipeline
41 42 43 44
    through `config.assets.cache`.

    *Guillermo Iguaran*

45 46
*   `Rails.public_path` now returns a Pathname object. *Prem Sichanugrist*

47
*   Remove highly uncommon `config.assets.manifest` option for moving the manifest path.
48
    This option is now unsupported in sprockets-rails.
49 50 51

    *Guillermo Iguaran & Dmitry Vorotilin*

52 53 54 55 56
*   Add `config.action_controller.permit_all_parameters` to disable
    StrongParameters protection, it's false by default.

    *Guillermo Iguaran*

57
*   Remove `config.active_record.whitelist_attributes` and
58 59 60 61 62
    `config.active_record.mass_assignment_sanitizer` from new applications since
    MassAssignmentSecurity has been extracted from Rails.

    *Guillermo Iguaran*

63 64 65 66 67 68 69 70 71 72
*   Change `rails new` and `rails plugin new` generators to name the `.gitkeep` files
    as `.keep` in a more SCM-agnostic way.

    Change `--skip-git` option to only skip the `.gitignore` file and still generate
    the `.keep` files.

    Add `--skip-keeps` option to skip the `.keep` files.

    *Derek Prior & Francesco Rodriguez*

73 74
*   Fixed support for DATABASE_URL environment variable for rake db tasks. *Grace Liu*

N
needfeed 已提交
75 76 77
*   rails dbconsole now can use SSL for MySQL. The database.yml options sslca, sslcert, sslcapath, sslcipher,
    and sslkey now affect rails dbconsole. *Jim Kingdon and Lars Petrus*

78 79 80 81 82
*   Correctly handle SCRIPT_NAME when generating routes to engine in application
    that's mounted at a sub-uri. With this behavior, you *should not* use
    default_url_options[:script_name] to set proper application's mount point by
    yourself. *Piotr Sarnacki*

J
José Valim 已提交
83 84
*   `config.threadsafe!` is deprecated in favor of `config.eager_load` which provides a more fine grained control on what is eager loaded *José Valim*

85 86 87 88 89 90 91 92 93 94 95
*   The migration generator will now produce AddXXXToYYY/RemoveXXXFromYYY migrations with references statements, for instance

        rails g migration AddReferencesToProducts user:references supplier:references{polymorphic}

    will generate the migration with:

        add_reference :products, :user, index: true
        add_reference :products, :supplier, polymorphic: true, index: true

    *Aleksey Magusev*

96 97 98 99 100 101 102 103 104 105
*   Allow scaffold/model/migration generators to accept a `polymorphic` modifier
    for `references`/`belongs_to`, for instance

        rails g model Product supplier:references{polymorphic}

    will generate the model with `belongs_to :supplier, polymorphic: true`
    association and appropriate migration.

    *Aleksey Magusev*

106 107
*   Set `config.active_record.migration_error` to `:page_load` for development *Richard Schneeman*

108 109
*   Add runner to Rails::Railtie as a hook called just after runner starts. *José Valim & kennyj*

110 111
*   Add `/rails/info/routes` path, displays same information as `rake routes` *Richard Schneeman & Andrew White*

112 113
*   Improved `rake routes` output for redirects *Łukasz Strzałkowski & Andrew White*

114 115
*   Load all environments available in `config.paths["config/environments"]`. *Piotr Sarnacki*

116
*   Add `config.queue_consumer` to change the job queue consumer from the default `ActiveSupport::ThreadedQueueConsumer`. *Carlos Antonio da Silva*
117

118
*   Add `Rails.queue` for processing jobs in the background. *Yehuda Katz*
119

120 121
*   Remove Rack::SSL in favour of ActionDispatch::SSL. *Rafael Mendonça França*

122 123
*   Remove Active Resource from Rails framework. *Prem Sichangrist*

124 125 126 127 128 129 130 131 132 133 134 135
*   Allow to set class that will be used to run as a console, other than IRB, with `Rails.application.config.console=`. It's best to add it to `console` block. *Piotr Sarnacki*

    Example:

        # it can be added to config/application.rb
        console do
          # this block is called only when running console,
          # so we can safely require pry here
          require "pry"
          config.console = Pry
        end

136 137 138
*   Add convenience `hide!` method to Rails generators to hide current generator
    namespace from showing when running `rails generate`. *Carlos Antonio da Silva*

139 140
*   Scaffold now uses `content_tag_for` in index.html.erb *José Valim*

S
Santiago Pastorino 已提交
141 142
*   Rails::Plugin has gone. Instead of adding plugins to vendor/plugins use gems or bundler with path or git dependencies. *Santiago Pastorino*

B
Brian Cardarella 已提交
143 144 145
*   Set config.action_mailer.async = true to turn on asynchronous
    message delivery *Brian Cardarella*

X
Xavier Noria 已提交
146
Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/railties/CHANGELOG.md) for previous changes.