aboutsummaryrefslogtreecommitdiffstats
path: root/railties/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'railties/CHANGELOG.md')
-rw-r--r--railties/CHANGELOG.md440
1 files changed, 173 insertions, 267 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index e4a08f68c1..21887c32fe 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,375 +1,281 @@
-## Rails 4.0.0 (unreleased) ##
+* `test_help.rb` now automatically checks/maintains your test datbase
+ schema. (Use `config.active_record.maintain_test_schema = false` to
+ disable.)
-* Move rails.png into a data-uri. One less file to get generated into a new
- application. This is also consistent with the removal of index.html.
+ *Jon Leighton*
- *Steve Klabnik*
+* Configure `secrets.yml` and `database.yml` to read configuration
+ from the system environment by default for production.
-* The application rake task `doc:rails` generates now an API like the
- official one (except for the links to GitHub).
-
- *Xavier Noria*
-
-* Allow vanilla apps to render CoffeeScript templates in production
-
- Vanilla apps already render CoffeeScript templates in development and test
- environments. With this change, the production behavior matches that of
- the other environments.
-
- Effectively, this meant moving coffee-rails (and the JavaScript runtime on
- which it is dependent) from the :assets group to the top-level of the
- generated Gemfile.
-
- *Gabe Kopley*
-
-* Don't generate a scaffold.css when --no-assets is specified
-
- *Kevin Glowacz*
-
-* Add support for generate scaffold password:digest
-
- * adds password_digest attribute to the migration
- * adds has_secure_password to the model
- * adds password and password_confirmation password_fields to _form.html
- * omits password from index.html and show.html
- * adds password and password_confirmation to the controller
- * adds unencrypted password and password_confirmation to the controller test
- * adds encrypted password_digest to the fixture
-
- *Sam Ruby*
-
-* Improved `rake test` command for running tests
-
- To run all tests:
-
- $ rake test
-
- To run a test suite
-
- $ rake test:[models,helpers,units,controllers,mailers,...]
-
- To run a selected test file(s):
-
- $ rake test test/unit/foo_test.rb [test/unit/bar_test.rb ...]
-
- To run a single test from a test file
-
- $ rake test test/unit/foo_test.rb TESTOPTS='-n test_the_truth'
-
-* Improve service pages with new layout (404, etc).
-
- *Stanislav Sobolev*
-
-
-## Rails 4.0.0.beta1 (February 25, 2013) ##
-
-* Improve `rake stats` for JavaScript and CoffeeScript: ignore block comments
- and calculates number of functions.
-
- *Hendy Tanata*
-
-* Ability to use a custom builder by passing `--builder` (or `-b`) has been removed.
- Consider using application template instead. See this guide for more detail:
- http://guides.rubyonrails.org/rails_application_templates.html
-
- *Prem Sichanugrist*
-
-* Fix `rake db:*` tasks to work with `DATABASE_URL` and without `config/database.yml`.
-
- *Terence Lee*
-
-* Add notice message for destroy action in scaffold generator.
-
- *Rahul P. Chaudhari*
-
-* Add two new test rake tasks to speed up full test runs.
-
- * `test:all`: run tests quickly by merging all types and not resetting db.
- * `test:all:db`: run tests quickly, but also reset db.
-
- *Ryan Davis*
-
-* Add `--rc` option to support the load of a custom rc file during the generation of a new app.
-
- *Amparo Luna*
-
-* Add `--no-rc` option to skip the loading of railsrc file during the generation of a new app.
-
- *Amparo Luna*
-
-* Fixes database.yml when creating a new rails application with '.'
- Fixes #8304.
-
- *Jeremy W. Rowe*
-
-* Restore Rails::Engine::Railties#engines with deprecation to ensure
- compatibility with gems such as Thinking Sphinx
- Fixes #8551.
-
- *Tim Raymond*
-
-* Specify which logs to clear when using the `rake log:clear` task.
- (e.g. rake log:clear LOGS=test,staging)
-
- *Matt Bridges*
+ *José Valim*
-* Allow a `:dirs` key in the `SourceAnnotationExtractor.enumerate` options
- to explicitly set the directories to be traversed so it's easier to define
- custom rake tasks.
+* `config.assets.raise_runtime_errors` is set to true by default
- *Brian D. Burns*
+ This option has been introduced in
+ [sprockets-rails#100][https://github.com/rails/sprockets-rails/pull/100]
+ and defaults to true in new applications in development.
-* Deprecate `Rails::Generators::ActiveModel#update_attributes` in favor of `#update`.
+ *Richard Schneeman*
- ORMs that implement `Generators::ActiveModel#update_attributes` should change
- to `#update`. Scaffold controller generators should change calls like:
+* Generates `html` and `text` templates for mailers by default.
- @orm_instance.update_attributes(...)
+ *Kassio Borges*
- to:
+* Move `secret_key_base` from `config/initializers/secret_token.rb`
+ to `config/secrets.yml`.
- @orm_instance.update(...)
+ `secret_key_base` is now saved in `Rails.application.secrets.secret_key_base`
+ and it fallbacks to the value of `config.secret_key_base` when it is not
+ present in `config/secrets.yml`.
- This goes along with the addition of `ActiveRecord::Base#update`.
+ `config/initializers/secret_token.rb` is not generated by default
+ in new applications.
- *Carlos Antonio da Silva*
+ *Guillermo Iguaran*
-* Include `jbuilder` by default and rely on its scaffold generator to show json API.
- Check https://github.com/rails/jbuilder for more info and examples.
+* Generate a new `secrets.yml` file in the `config` folder for new
+ applications. By default, this file contains the application's `secret_key_base`,
+ but it could also be used to store other secrets such as access keys for external
+ APIs.
- *DHH*
+ The secrets added to this file will be accessible via `Rails.application.secrets`.
+ For example, with the following `secrets.yml`:
-* Scaffold now generates HTML-only controller by default.
+ development:
+ secret_key_base: 3b7cd727ee24e8444053437c36cc66c3
+ some_api_key: SOMEKEY
- *DHH + Pavel Pravosud*
+ `Rails.application.secrets.some_api_key` will return `SOMEKEY` in the development
+ environment.
-* The generated `README.rdoc` for new applications invites the user to
- document the necessary steps to get the application up and running.
+ *Guillermo Iguaran*
- *Xavier Noria*
+* Add `ENV['DATABASE_URL']` support in `rails dbconsole`. Fixes #13320.
-* Generated applications no longer get `doc/README_FOR_APP`. In consequence,
- the `doc` directory is created on demand by documentation tasks rather than
- generated by default.
+ *Huiming Teo*
- *Xavier Noria*
+* Add `Application#message_verifier` method to return a message verifier.
-* App executables now live in the `bin/` directory: `bin/bundle`,
- `bin/rails`, `bin/rake`. Run `rake rails:update:bin` to add these
- executables to your own app. `script/rails` is gone from new apps.
+ This verifier can be used to generate and verify signed messages in the application.
- Running executables within your app ensures they use your app's Ruby
- version and its bundled gems, and it ensures your production deployment
- tools only need to execute a single script. No more having to carefully
- `cd` to the app dir and run `bundle exec ...`.
+ message = Rails.application.message_verifier(:sensitive_data).generate('my sensible data')
+ Rails.application.message_verifier(:sensitive_data).verify(message)
+ # => 'my sensible data'
- Rather than treating `bin/` as a junk drawer for generated "binstubs",
- bundler 1.3 adds support for generating stubs for just the executables
- you actually use: `bundle binstubs unicorn` generates `bin/unicorn`.
- Add that executable to git and version it just like any other app code.
+ It is recommended not to use the same verifier for different things, so you can get different
+ verifiers passing the name argument.
- *Jeremy Kemper*
+ message = Rails.application.message_verifier(:cookies).generate('my sensible cookie data')
-* `config.assets.enabled` is now true by default. If you're upgrading from a Rails 3.x app
- that does not use the asset pipeline, you'll be required to add `config.assets.enabled = false`
- to your application.rb. If you don't want the asset pipeline on a new app use `--skip-sprockets`
+ See the `ActiveSupport::MessageVerifier` documentation for more information.
- *DHH*
+ *Rafael Mendonça França*
-* Environment name can be a start substring of the default environment names
- (production, development, test). For example: tes, pro, prod, dev, devel.
- Fixes #8628.
+* The [Spring application
+ preloader](https://github.com/jonleighton/spring) is now installed
+ by default for new applications. It uses the development group of
+ the Gemfile, so will not be installed in production.
- *Mykola Kyryk*
+ *Jon Leighton*
-* Add `-B` alias for `--skip-bundle` option in the rails new generators.
+* Uses .railsrc while creating new plugin if it is available.
+ Fixes #10700.
- *Jiri Pospisil*
+ *Prathamesh Sonpatki*
-* Quote column names in generates fixture files. This prevents
- conflicts with reserved YAML keywords such as 'yes' and 'no'
- Fixes #8612.
+* Remove turbolinks when generating a new application based on a template that skips it.
- *Yves Senn*
+ Example:
-* Explicit options have precedence over `~/.railsrc` on the `rails new` command.
+ Skips turbolinks adding `add_gem_entry_filter { |gem| gem.name != "turbolinks" }`
+ to the template.
- *Rafael Mendonça França*
+ *Lauro Caetano*
-* Generated migrations now always use the `change` method.
+* Instrument an `load_config_initializer.railties` event on each load of configuration initializer
+ from `config/initializers`. Subscribers should be attached before `load_config_initializers`
+ initializer completed.
- *Marc-André Lafortune*
+ Registering subscriber examples:
-* Add `app/models/concerns` and `app/controllers/concerns` to the default directory structure and load path.
- See http://37signals.com/svn/posts/3372-put-chubby-models-on-a-diet-with-concerns for usage instructions.
+ # config/application.rb
+ module RailsApp
+ class Application < Rails::Application
+ ActiveSupport::Notifications.subscribe('load_config_initializer.railties') do |*args|
+ event = ActiveSupport::Notifications::Event.new(*args)
+ puts "Loaded initializer #{event.payload[:initializer]} (#{event.duration}ms)"
+ end
+ end
+ end
- *DHH*
+ # my_engine/lib/my_engine/engine.rb
+ module MyEngine
+ class Engine < ::Rails::Engine
+ config.before_initialize do
+ ActiveSupport::Notifications.subscribe('load_config_initializer.railties') do |*args|
+ event = ActiveSupport::Notifications::Event.new(*args)
+ puts "Loaded initializer #{event.payload[:initializer]} (#{event.duration}ms)"
+ end
+ end
+ end
+ end
-* The `rails/info/routes` now correctly formats routing output as an html table.
+ *Paul Nikitochkin*
- *Richard Schneeman*
+* Support for Pathnames in eager load paths.
-* The `public/index.html` is no longer generated for new projects.
- Page is replaced by internal `welcome_controller` inside of railties.
+ *Mike Pack*
- *Richard Schneeman*
+* Fixed missing line and shadow on service pages(404, 422, 500).
-* Add `ENV['RACK_ENV']` support to `rails runner/console/server`.
+ *Dmitry Korotkov*
- *kennyj*
+* `BACKTRACE` environment variable to show unfiltered backtraces for
+ test failures.
-* Add `db` to list of folders included by `rake notes` and `rake notes:custom`. *Antonio Cangiano*
+ Example:
-* Engines with a dummy app include the rake tasks of dependencies in the app namespace.
- Fixes #8229.
+ $ BACKTRACE=1 ruby -Itest ...
+ # or with rake
+ $ BACKTRACE=1 bin/rake
*Yves Senn*
-* Add `sqlserver.yml` template file to satisfy `-d sqlserver` being passed to `rails new`.
- Fixes #6882.
-
- *Robert Nesius*
+* Removal of all javascript stuff (gems and files) when generating a new
+ application using the `--skip-javascript` option.
-* Rake test:uncommitted finds git directory in ancestors *Nicolas Despres*
+ *Robin Dupret*
-* Add dummy app Rake tasks when `--skip-test-unit` and `--dummy-path` is passed to the plugin generator.
- Fixes #8121.
+* Make the application name snake cased when it contains spaces
- *Yves Senn*
+ The application name is used to fill the `database.yml` and
+ `session_store.rb` files ; previously, if the provided name
+ contained whitespaces, it led to unexpected names in these files.
-* Add `.rake` to list of file extensions included by `rake notes` and `rake notes:custom`. *Brent J. Nordquist*
+ *Robin Dupret*
-* New test locations `test/models`, `test/helpers`, `test/controllers`, and
- `test/mailers`. Corresponding rake tasks added as well. *Mike Moore*
+* Added `--model-name` option to `ScaffoldControllerGenerator`.
-* Set a different cache per environment for assets pipeline
- through `config.assets.cache`.
-
- *Guillermo Iguaran*
+ *yalab*
-* `Rails.public_path` now returns a Pathname object. *Prem Sichanugrist*
+* Expose MiddlewareStack#unshift to environment configuration.
-* Remove highly uncommon `config.assets.manifest` option for moving the manifest path.
- This option is now unsupported in sprockets-rails.
+ *Ben Pickles*
- *Guillermo Iguaran & Dmitry Vorotilin*
+* `rails server` will only extend the logger to output to STDOUT
+ in development environment.
-* Add `config.action_controller.permit_all_parameters` to disable
- StrongParameters protection, it's false by default.
+ *Richard Schneeman*
- *Guillermo Iguaran*
+* Don't require passing path to app before options in `rails new`
+ and `rails plugin new`
-* Remove `config.active_record.whitelist_attributes` and
- `config.active_record.mass_assignment_sanitizer` from new applications since
- MassAssignmentSecurity has been extracted from Rails.
+ *Piotr Sarnacki*
- *Guillermo Iguaran*
+* rake notes now searches *.less files
-* Change `rails new` and `rails plugin new` generators to name the `.gitkeep` files
- as `.keep` in a more SCM-agnostic way.
+ *Josh Crowder*
- Change `--skip-git` option to only skip the `.gitignore` file and still generate
- the `.keep` files.
+* Generate nested route for namespaced controller generated using
+ `rails g controller`.
+ Fixes #11532.
- Add `--skip-keeps` option to skip the `.keep` files.
+ Example:
- *Derek Prior & Francesco Rodriguez*
+ rails g controller admin/dashboard index
-* Fixed support for `DATABASE_URL` environment variable for rake db tasks.
+ # Before:
+ get "dashboard/index"
- *Grace Liu*
+ # After:
+ namespace :admin do
+ get "dashboard/index"
+ end
-* `rails dbconsole` now can use SSL for MySQL. The `database.yml` options sslca, sslcert, sslcapath, sslcipher
- and sslkey now affect `rails dbconsole`.
+ *Prathamesh Sonpatki*
- *Jim Kingdon and Lars Petrus*
+* Fix the event name of action_dispatch requests.
-* 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.
+ *Rafael Mendonça França*
- *Piotr Sarnacki*
+* Make `config.log_level` work with custom loggers.
-* `config.threadsafe!` is deprecated in favor of `config.eager_load` which provides a more fine grained control on what is eager loaded .
+ *Max Shytikov*
- *José Valim*
+* Changed stylesheet load order in the stylesheet manifest generator.
+ Fixes #11639.
-* The migration generator will now produce AddXXXToYYY/RemoveXXXFromYYY migrations with references statements, for instance
+ *Pawel Janiak*
- rails g migration AddReferencesToProducts user:references supplier:references{polymorphic}
+* Added generated unit test for generator generator using new
+ `test:generators` rake task.
- will generate the migration with:
+ *Josef Šimánek*
- add_reference :products, :user, index: true
- add_reference :products, :supplier, polymorphic: true, index: true
+* Removed `update:application_controller` rake task.
- *Aleksey Magusev*
+ *Josef Šimánek*
-* Allow scaffold/model/migration generators to accept a `polymorphic` modifier
- for `references`/`belongs_to`, for instance
+* Fix `rake environment` to do not eager load modules
- rails g model Product supplier:references{polymorphic}
+ *Paul Nikitochkin*
- will generate the model with `belongs_to :supplier, polymorphic: true`
- association and appropriate migration.
+* Fix `rake notes` to look into `*.sass` files
- *Aleksey Magusev*
+ *Yuri Artemev*
-* Set `config.active_record.migration_error` to `:page_load` for development.
+* Removed deprecated `Rails.application.railties.engines`.
- *Richard Schneeman*
+ *Arun Agrawal*
-* Add runner to `Rails::Railtie` as a hook called just after runner starts.
+* Removed deprecated threadsafe! from Rails Config.
- *José Valim & kennyj*
+ *Paul Nikitochkin*
-* Add `/rails/info/routes` path, displays same information as `rake routes` .
+* Remove deprecated `ActiveRecord::Generators::ActiveModel#update_attributes` in
+ favor of `ActiveRecord::Generators::ActiveModel#update`.
- *Richard Schneeman & Andrew White*
+ *Vipul A M*
-* Improved `rake routes` output for redirects.
+* Remove deprecated `config.whiny_nils` option.
- *Łukasz Strzałkowski & Andrew White*
+ *Vipul A M*
-* Load all environments available in `config.paths["config/environments"]`.
+* Rename `commands/plugin_new.rb` to `commands/plugin.rb` and fix references
- *Piotr Sarnacki*
+ *Richard Schneeman*
-* Remove `Rack::SSL` in favour of `ActionDispatch::SSL`.
+* Fix `rails plugin --help` command.
- *Rafael Mendonça França*
+ *Richard Schneeman*
-* Remove Active Resource from Rails framework.
+* Omit turbolinks configuration completely on skip_javascript generator option.
- *Prem Sichangrist*
+ *Nikita Fedyashev*
-* 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.
+* Removed deprecated rake tasks for running tests: `rake test:uncommitted` and
+ `rake test:recent`.
- Example:
+ *John Wang*
- # 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
+* Clearing autoloaded constants triggers routes reloading.
+ Fixes #10685.
- *Piotr Sarnacki*
+ *Xavier Noria*
-* Add convenience `hide!` method to Rails generators to hide current generator
- namespace from showing when running `rails generate`.
+* Fixes bug with scaffold generator with `--assets=false --resource-route=false`.
+ Fixes #9525.
- *Carlos Antonio da Silva*
+ *Arun Agrawal*
-* Rails::Plugin has gone. Instead of adding plugins to vendor/plugins use gems or bundler with path or git dependencies.
+* Rails::Railtie no longer forces the Rails::Configurable module on everything
+ that subclasses it. Instead, the methods from Rails::Configurable have been
+ moved to class methods in Railtie and the Railtie has been made abstract.
- *Santiago Pastorino*
+ *John Wang*
-* Set config.action_mailer.async = true to turn on asynchronous
- message delivery.
+* Changes repetitive th tags to use colspan attribute in `index.html.erb` template.
- *Brian Cardarella*
+ *Sıtkı Bağdat*
-Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/railties/CHANGELOG.md) for previous changes.
+Please check [4-0-stable](https://github.com/rails/rails/blob/4-0-stable/railties/CHANGELOG.md) for previous changes.