rails--rails/railties/CHANGELOG.md

105 lines
4.3 KiB
Markdown
Raw Normal View History

2012-01-02 20:49:18 +00:00
## Rails 4.0.0 (unreleased) ##
* `Rails.public_path` now returns a Pathname object. *Prem Sichanugrist*
* Remove highly uncommon `config.assets.manifest` option for moving the manifest path.
This option is now unsupported in sprockets-rails.
*Guillermo Iguaran & Dmitry Vorotilin*
* Add `config.action_controller.permit_all_parameters` to disable
StrongParameters protection, it's false by default.
*Guillermo Iguaran*
* Remove `config.active_record.whitelist_attributes` and
`config.active_record.mass_assignment_sanitizer` from new applications since
MassAssignmentSecurity has been extracted from Rails.
*Guillermo Iguaran*
* 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*
* Fixed support for DATABASE_URL environment variable for rake db tasks. *Grace Liu*
2012-09-10 19:36:49 +00:00
* 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*
Fix handling SCRIPT_NAME from within mounted engine's When you mount your application at a path, for example /myapp, server should set SCRIPT_NAME to /myapp. With such information, rails application knows that it's mounted at /myapp path and it should generate routes relative to that path. Before this patch, rails handled SCRIPT_NAME correctly only for regular apps, but it failed to do it for mounted engines. The solution was to hardcode default_url_options[:script_name], which is not the best answer - it will work only when application is mounted at a fixed path. This patch fixes the situation by respecting original value of SCRIPT_NAME when generating application's routes from engine and the other way round - when you generate engine's routes from application. This is done by using one of 2 pieces of information in env - current SCRIPT_NAME or SCRIPT_NAME for a corresponding router. This is because we have 2 cases to handle: - generating engine's route from application: in this situation SCRIPT_NAME is basically SCRIPT_NAME set by the server and it indicates the place where application is mounted, so we can just pass it as :original_script_name in url_options. :original_script_name is used because if we use :script_name, router will ignore generating prefix for engine - generating application's route from engine: in this situation we already lost information about the SCRIPT_NAME that server used. For example if application is mounted at /myapp and engine is mounted at /blog, at this point SCRIPT_NAME is equal /myapp/blog. Because of that we need to keep reference to /myapp SCRIPT_NAME by binding it to the current router. Later on we can extract it and use when generating url Please note that starting from now you *should not* use default_url_options[:script_name] explicitly if your server already passes correct SCRIPT_NAME to rack env. (closes #6933)
2012-08-10 21:27:51 +00:00
* 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*
2012-08-01 19:10:55 +00:00
* `config.threadsafe!` is deprecated in favor of `config.eager_load` which provides a more fine grained control on what is eager loaded *José Valim*
* 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*
* 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*
* Set `config.active_record.migration_error` to `:page_load` for development *Richard Schneeman*
* Add runner to Rails::Railtie as a hook called just after runner starts. *José Valim & kennyj*
* Add `/rails/info/routes` path, displays same information as `rake routes` *Richard Schneeman & Andrew White*
2012-05-19 13:18:37 +00:00
* Improved `rake routes` output for redirects *Łukasz Strzałkowski & Andrew White*
* Load all environments available in `config.paths["config/environments"]`. *Piotr Sarnacki*
2012-05-04 01:26:30 +00:00
* Add `config.queue_consumer` to allow the default consumer to be configurable. *Carlos Antonio da Silva*
* Add Rails.queue as an interface with a default implementation that consumes jobs in a separate thread. *Yehuda Katz*
2012-03-17 16:36:24 +00:00
* Remove Rack::SSL in favour of ActionDispatch::SSL. *Rafael Mendonça França*
* Remove Active Resource from Rails framework. *Prem Sichangrist*
* 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
* Add convenience `hide!` method to Rails generators to hide current generator
namespace from showing when running `rails generate`. *Carlos Antonio da Silva*
* Scaffold now uses `content_tag_for` in index.html.erb *José Valim*
2012-01-02 20:49:18 +00:00
* Rails::Plugin has gone. Instead of adding plugins to vendor/plugins use gems or bundler with path or git dependencies. *Santiago Pastorino*
2012-06-23 19:21:33 +00:00
* Set config.action_mailer.async = true to turn on asynchronous
message delivery *Brian Cardarella*
Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/railties/CHANGELOG.md) for previous changes.