- No changes.
- No changes.
- No changes.
-
Generate random development secrets
A random development secret is now generated to tmp/development_secret.txt
This avoids an issue where development mode servers were vulnerable to remote code execution.
Fixes CVE-2019-5420
Eileen M. Uchitelle, Aaron Patterson, John Hawthorn
- No changes.
- No changes.
- No changes.
-
Add
config/initializers/to_time_preserves_timezone.rb, which tells Active Support to preserve the receiver's timezone when callingto_time. This matches the new behavior that will be part of Ruby 2.4.Fixes #24617.
Andrew White
-
Reset a new session directly after its creation in ActionDispatch::IntegrationTest#open_session
Fixes Issue #22742
Tawan Sierek
-
Run
before_configurationcallbacks as soon as application constant inherits fromRails::Application.Fixes #19880.
Yuji Yaginuma
-
Do not run
bundle installwhen generating a new plugin.Since bundler 1.12.0, the gemspec is validated so the
bundle installcommand will fail just after the gem is created causing confusion to the users. This change was a bug fix to correctly validate gemspecs.Rafael Mendonça França
- No changes.
- No changes.
- No changes.
-
Fix displaying mailer previews on non local requests when config
action_mailer.show_previewsis setWojciech Wnętrzak
-
Fix STATS_DIRECTORIES already defined warning when running rake from within the top level directory of an engine that has a test app.
Fixes #20510
Ersin Akinci
-
Fix
NoMethodErrorwhen generating a scaffold inside a full engine.Yuji Yaginuma
-
assert_fileunderstands paths with special characters (eg.v0.1.4~alpha+nightly).Diego Carrion
-
Make generated scaffold functional tests work inside engines.
Yuji Yaginuma
-
Add support for inline images in mailer previews by using an interceptor class to convert cid: urls in image src attributes to data urls. The interceptor is not enabled by default but can be done in an initializer:
# config/initializer/preview_interceptors.rb ActionMailer::Base.register_preview_interceptor(ActionMailer::InlinePreviewInterceptor)Andrew White
-
Fix mailer previews with attachments by using the mail gem's own API to locate the first part of the correct mime type.
Fixes #14435.
Andrew White
- No Changes *
-
Add a new-line to the end of route method generated code.
We need to add a
\n, because we cannot have two routes in the same line.arthurnn
-
Force generated routes to be inserted into routes.rb
Andrew White
-
Don't remove all line endings from routes.rb when revoking scaffold.
Fixes #15913.
Andrew White
-
Fix scaffold generator with
--helper=falseoption.Rafael Mendonça França
-
Deprecate
config.serve_static_assetsin favor ofconfig.serve_static_filesto clarify that the option is unrelated to the asset pipeline.Godfrey Chan
-
config.serve_static_filescan now be set from an environment variable in production mode. The feature remains off by default, but can be enabled by settingRAILS_SERVE_STATIC_FILESto a non-empty string at boot time.Richard Schneeman, Godfrey Chan
-
Generated migrations add the appropriate foreign key constraints to references.
Derek Prior
-
Deprecate different default for
log_levelin production.Godfrey Chan, Matthew Draper
-
Generated
.gitignoreexcludes the wholelog/directory, not only*.logfiles.ShunsukeAida
-
Rails::Paths::Path.unshiftnow has the same interface asArray.unshift.Igor Kapkov
-
Make
rake testrun all tests in test folder.Deprecate
rake test:alland replacerake test:all:dbwithrake test:dbDavid Geukers
-
secret_tokenis now saved inRails.application.secrets.secret_tokenand it falls back to the value ofconfig.secret_tokenwhen it is not present inconfig/secrets.yml.Benjamin Fleischer
-
Remove
--skip-action-viewoption fromRails::Generators::AppBase.Fixes #17023.
Dan Olson
-
Specify dummy app's db migrate path in plugin's test_helper.rb.
Fixes #16877.
Yukio Mizuta
-
Inject
Rack::Lockifconfig.eager_loadis false.Fixes #15089.
Xavier Noria
-
Change the path of dummy app location in plugin's test_helper.rb for cases you specify dummy_path option.
Yukio Mizuta
-
Fix a bug in the
gemmethod for Rails templates when non-String options are used.Fixes #16709.
Yves Senn
-
The web-console gem is now installed by default for new applications. It can help you debug development exceptions by spawning an interactive console in its cause binding.
Ryan Dao, Genadi Samokovarov, Guillermo Iguaran
-
Add a
requiredoption to the model generator for associationsSean Griffin
-
Add
after_bundlecallbacks in Rails templates. Useful for allowing the generated binstubs to be added to version control.Fixes #16292.
Stefan Kanev
-
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 config.x.payment_processing.schedule = :daily config.x.payment_processing.retries = 3 config.x.super_debugger = trueThese configuration points are then available through the configuration object:
Rails.configuration.x.payment_processing.schedule # => :daily Rails.configuration.x.payment_processing.retries # => 3 Rails.configuration.x.super_debugger # => trueDHH
-
Scaffold generator
_formpartial addsclass="field"for password confirmation fields.noinkling
-
Add
Rails::Application.config_forto 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 Rails.application.configure do config.middleware.use ExceptionNotifier, config_for(:exception_notification) endRafael Mendonça França, DHH
-
Deprecate
Rails::Rack::LogTailerwithout replacement.Rafael Mendonça França
-
Add
--skip-turbolinksoption to the app generator.Rafael Mendonça França
-
Invalid
bin/rails generatecommands will now show spelling suggestions.Richard Schneeman
-
Add
bin/setupscript to bootstrap an application.Yves Senn
-
Replace double quotes with single quotes while adding an entry into Gemfile.
Alexander Belaev
-
Default
config.assets.digesttotruein development.Dan Kang
-
Load database configuration from the first
database.ymlavailable in paths.Pier-Olivier Thibault
-
Reading name and email from git for plugin gemspec.
Fixes #9589.
Arun Agrawal, Abd ar-Rahman Hamidi, Roman Shmatov
-
Fix
consoleandgeneratorsblocks defined at different environments.Fixes #14748.
Rafael Mendonça França
-
Move configuration of asset precompile list and version to an initializer.
Matthew Draper
-
Remove sqlite3 lines from
.gitignoreif the application is not using sqlite3.Dmitrii Golub
-
Add public API to register new extensions for
rake notes.Example:
config.annotations.register_extensions("scss", "sass") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ }Roberto Miranda
-
Removed unnecessary
rails applicationcommand.Arun Agrawal
-
Make the
rails:templaterake task load the application's initializers.Fixes #12133.
Robin Dupret
-
Introduce
Rails.gem_versionas a convenience method to returnGem::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 #=> truePrem Sichanugrist
-
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
Please check 4-1-stable for previous changes.