aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | Use ASCII-8BIT paths in ActionDispatch::StaticAndrew White2018-03-226-4/+15
| | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rack gem returns PATH_INFO as an ASCII-8BIT encoded string but it was being converted to US-ASCII by the match? method because it was calling Rack::Utils.escape_path. To prevent incompatibile encoding warnings use ASCII-8BIT strings for the root path and let Ruby handle any filename encoding conversion. Fixes #32294, Closes #32314.
* | | | | | | | Remove unused variableRafael Mendonça França2018-03-221-1/+0
| | | | | | | |
* | | | | | | | Merge pull request #32319 from yahonda/no_monkeypatch_for_ruby260Rafael França2018-03-221-9/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Ruby 2.6 will not require monkey patched `URI#unescape`
| * | | | | | | Ruby 2.6 will not require monkey patched `URI#unescape`Yasuo Honda2018-03-221-9/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | since revision 62897 https://github.com/ruby/ruby/commit/234a30459cdae6aa7da6e28a1082d9c11f315696
* | | | | | | Merge pull request #31869 from BKSpurgeon/patch-1Ryuta Kamizono2018-03-221-12/+16
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Update Action Mailer Documentation
| * | | | | | | Update documentation [ci skip]Ben Koshy2018-02-021-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | Remove superfluous repetition and place them in a common section. [ci skip]
* | | | | | | | Use try in tests that try to test try.Kasper Timm Hansen2018-03-211-7/+2
| | | | | | | |
* | | | | | | | Fix `test_config_another_database` failureRyuta Kamizono2018-03-222-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Somehow `test_config_another_database` didn't fail on CI, but it will fail locally. https://travis-ci.org/rails/rails/jobs/356212950#L2474-L2482 ``` % bundle exec ruby -w -Itest test/generators/app_generator_test.rb -n test_config_another_database Run options: -n test_config_another_database --seed 7260 # Running: F Failure: AppGeneratorTest#test_config_another_database [test/generators/app_generator_test.rb:417]: Expected /^\s*gem\s+["']mysql2["'], '~> 0.4.4'$*/ to match "source 'https://rubygems.org'\ngit_source(:github) { |repo| \"https://github.com/\#{repo}.git\" }\n\nruby '2.5.0'\n\n# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'\ngem 'rails', '~> 6.0.0.alpha'\n# Use mysql as the database for Active Record\ngem 'mysql2', '>= 0.4.4', '< 0.6.0'\n# Use Puma as the app server\ngem 'puma', '~> 3.11'\n# Use SCSS for stylesheets\ngem 'sass-rails', '~> 5.0'\n# Use Uglifier as compressor for JavaScript assets\ngem 'uglifier', '>= 1.3.0'\n# See https://github.com/rails/execjs#readme for more supported runtimes\n# gem 'mini_racer', platforms: :ruby\n\n# Use CoffeeScript for .coffee assets and views\ngem 'coffee-rails', '~> 4.2'\n# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks\ngem 'turbolinks', '~> 5'\n# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder\ngem 'jbuilder', '~> 2.5'\n# Use Redis adapter to run Action Cable in production\n# gem 'redis', '~> 4.0'\n# Use ActiveModel has_secure_password\n# gem 'bcrypt', '~> 3.1.7'\n\n# Use ActiveStorage variant\n# gem 'mini_magick', '~> 4.8'\n\n# Use Capistrano for deployment\n# gem 'capistrano-rails', group: :development\n\n# Reduces boot times through caching; required in config/boot.rb\ngem 'bootsnap', '>= 1.1.0', require: false\n\ngroup :development, :test do\n # Call 'byebug' anywhere in the code to stop execution and get a debugger console\n gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]\nend\n\ngroup :development do\n # Access an interactive console on exception pages or by calling 'console' anywhere in the code.\n gem 'web-console', '>= 3.3.0'\n gem 'listen', '>= 3.0.5', '< 3.2'\n # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring\n gem 'spring'\n gem 'spring-watcher-listen', '~> 2.0.0'\nend\n\ngroup :test do\n # Adds support for Capybara system testing and selenium driver\n gem 'capybara', '>= 2.15', '< 4.0'\n gem 'selenium-webdriver'\n # Easy installation and use of chromedriver to run system tests with Chrome\n gem 'chromedriver-helper'\nend\n\n# Windows does not include zoneinfo files, so bundle the tzinfo-data gem\ngem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]\n". bin/rails test test/generators/app_generator_test.rb:411 Finished in 0.174681s, 5.7247 runs/s, 34.3483 assertions/s. 1 runs, 6 assertions, 1 failures, 0 errors, 0 skips ```
* | | | | | | | Add `QueryingMethodsDelegationTest` to cover query methods delegationRyuta Kamizono2018-03-221-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes to ease to detect a future regression as long as the methods are covered by this test.
* | | | | | | | Merge pull request #32221 from composerinteralia/batch-predicate-builderRyuta Kamizono2018-03-221-10/+16
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Use PredicateBuilder for bind params in Relation::Batches
| * | | | | | | | Use PredicateBuilder for bind params in BatchesDaniel Colson2018-03-111-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the PredicateBuilder to build the bind attributes allows Batch to drop its dependency on Relation::QueryAttribute and Arel::Nodes::BindParam
* | | | | | | | | Merge pull request #32253 from zwass/before_action_docsRyuta Kamizono2018-03-221-0/+12
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add cancellation info to before filter docs [ci skip]
| * | | | | | | | | Add cancellation info to before filter docsZachary Wasserman2018-03-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is important for users to know that a render or redirect in a "before" filter causes the action to be cancelled. This was addressed in the guide, but not the API docs (http://guides.rubyonrails.org/action_controller_overview.html#filters). [ci skip]
* | | | | | | | | | Merge pull request #32310 from sodabrew/mysql2-0.4-0.5Ryuta Kamizono2018-03-222-2/+2
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / / |/| | | | | | | | | Support mysql2 0.4.x and 0.5.x
| * | | | | | | | | Support mysql2 0.4.x and 0.5.xAaron Stone2018-03-202-2/+2
| | |_|_|/ / / / / | |/| | | | | | |
* | | | | | | | | Update loofah to mitigate CVE-2018-8048Andrew White2018-03-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See flavorjones/loofah#144
* | | | | | | | | Merge pull request #32293 from dzirtusss/fix-system-tests-transactionsEileen M. Uchitelle2018-03-211-0/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix system tests transactions not closed between examples
| * | | | | | | | | Fix system tests transactions not closed between examplesSergey Tarasov2018-03-191-0/+1
| | | | | | | | | |
* | | | | | | | | | Cache url helpers moduleAndrew White2018-03-211-1/+2
| |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The urls helpers module returned by Rails.application.routes.url_helpers isn't cached so to prevent the cost of building the module cache it locally.
* | | | | | | | | Allow any version of dalli less them 2.7.7Rafael Mendonça França2018-03-202-2/+2
| | | | | | | | |
* | | | | | | | | Merge pull request #32305 from q-centrix/perf-improvement-translation-helperAndrew White2018-03-201-2/+5
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Memoize the result of gsubbing @virtual_path
| * | | | | | | | | Memoize the result of gsubbing @virtual_pathDillon Welch2018-03-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gets called many times for each virtual_path, creating a new string each time that `translate` is called. We can memoize this so that it only happens once per virtual_path instead.
* | | | | | | | | | Merge pull request #32302 from q-centrix/perf-improvement-tag-nameAndrew White2018-03-201-3/+3
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Interpolate '' instead of nil when multiple is false.
| * | | | | | | | | | Interpolate '' instead of nil when multiple is false.Dillon Welch2018-03-201-3/+3
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "my string #{nil}" results in an additional '' string allocation, I'm guessing because the nil has to be converted to a string. "my string #{'[]' if multiple}" results in "my string #{nil}" if multiple is false. Doing "my string #{''}" does not result in an extra string allocation. I moved the if multiple logic into a method so I only had to make the change once. ```ruby begin require "bundler/inline" rescue LoadError => e $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" raise e end gemfile(true) do source "https://rubygems.org" gem "benchmark-ips" gem "rails" end def allocate_count GC.disable before = ObjectSpace.count_objects yield after = ObjectSpace.count_objects after.each { |k,v| after[k] = v - before[k] } after[:T_HASH] -= 1 # probe effect - we created the before hash. GC.enable result = after.reject { |k,v| v == 0 } GC.start result end @html_options = {} def master_version(multiple=nil) "hi#{"[]" if multiple}" end def fast_version(multiple=nil) str = multiple ? "[]" : '' "hi#{str}" end def test puts "master_version" puts allocate_count { 1000.times { master_version } } puts "master_version with arg" puts allocate_count { 1000.times { master_version(' there') } } puts "fast_version" puts allocate_count { 1000.times { fast_version } } puts "fast_version with arg" puts allocate_count { 1000.times { fast_version(' there') } } Benchmark.ips do |x| x.report("master_version") { master_version } x.report("master_version with arg") { master_version(' there') } x.report("fast_version") { fast_version } x.report("fast_version with arg") { fast_version(' there') } x.compare! end end test ``` results: ```ruby master_version {:FREE=>-1981, :T_STRING=>2052} master_version with arg {:FREE=>-1001, :T_STRING=>1000} fast_version {:FREE=>-1001, :T_STRING=>1000} fast_version with arg {:FREE=>-1001, :T_STRING=>1000} Warming up -------------------------------------- master_version 138.851k i/100ms master_version with arg 164.029k i/100ms fast_version 165.737k i/100ms fast_version with arg 167.016k i/100ms Calculating ------------------------------------- master_version 2.464M (±14.7%) i/s - 11.941M in 5.023307s master_version with arg 3.754M (± 8.5%) i/s - 18.699M in 5.021354s fast_version 3.449M (±11.7%) i/s - 17.071M in 5.033312s fast_version with arg 3.636M (± 6.9%) i/s - 18.205M in 5.034792s Comparison: master_version with arg: 3753896.1 i/s fast_version with arg: 3636094.5 i/s - same-ish: difference falls within error fast_version: 3448766.2 i/s - same-ish: difference falls within error master_version: 2463857.3 i/s - 1.52x slower ```
* | | | | | | | | | Merge pull request #32282 from javan/fix-digesting-mixed-formatsJavan Makhmali2018-03-203-4/+15
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | Fix digesting templates with mixed formats
| * | | | | | | | | Fix digesting templates with mixed formatsJavan Makhmali2018-03-203-4/+15
|/ / / / / / / / /
* | | | | | | | | Merge pull request #32300 from ↵Rafael França2018-03-198-99/+9
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | albertoalmagro/albertoalmagro/remove-outdated-todo ActiveJob: Remove support for Qu gem.
| * | | | | | | | | Remove support for Qu gem.Alberto Almagro2018-03-198-99/+9
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reasons are that the Qu gem wasn't compatible since Rails 5.1, gem development was stopped in 2014 and maintainers have confirmed its demise. See issue #32273
* | | | | | / / / Add documentation about not accepting PRs for new adapters (#32298)Jeremy Green2018-03-192-0/+7
| |_|_|_|_|/ / / |/| | | | | | |
* | | | | | | | Remove backported CHANGELOG entry [ci skip]Andrew White2018-03-191-8/+0
| | | | | | | |
* | | | | | | | Allow full use of the AWS S3 SDK authentication options (#32270)Brian Knight2018-03-194-3/+18
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an explicit AWS key pair and/or region is not provided in config/storage.yml, attempt to use environment variables, shared credentials, or IAM role credentials. Order of precedence is determined by the AWS SDK[1]. [1]: https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/setup-config.html
* | | | | | | Merge pull request #32278 from ↵Eileen M. Uchitelle2018-03-191-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | saveriomiroddi/add_mysql_json_to_activerecord_store_documentation Add MySQL JSON reference to ActiveRecord::Store documentation
| * | | | | | | Add MySQL JSON reference to ActiveRecord::Store documentationSaverio Miroddi2018-03-171-2/+2
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current documentation explicitly mentions only PostgreSQL (hstore/json) for use with `.store_accessor`, making it somewhat confusing what to choose on a MySQL 5.7+ setup (which introduced a json data type).
* | | | | | | Merge pull request #32283 from bogdanvlviv/move-csp-info-from-5_2_release_notesEileen M. Uchitelle2018-03-192-63/+109
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Move CSP info from 5.2 release notes to guide [ci skip]
| * | | | | | | Move CSP info from 5.2 release notes to guide [ci skip]bogdanvlviv2018-03-182-63/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add mention about "nonce". Related to https://github.com/rails/rails/pull/32222#issuecomment-372268157
* | | | | | | | Merge pull request #32284 from bogdanvlviv/fix-failing-test-test_quoted_time_utcAndrew White2018-03-191-2/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix failing `QuotingTest#test_quoted_time_utc`
| * | | | | | | | Fix failing `QuotingTest#test_quoted_time_utc`bogdanvlviv2018-03-191-2/+2
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test fails in specific time. Example: If run this test on the machine with time 01:00 am UTC+2, this test will fail. Changing representing of 2000-01-01 01:00 am UTC+2 to UTC+0 change the day, month and even year in our case, so substitution `"2000-01-01 "` to `""` isn't possible. ``` Failure: ActiveRecord::ConnectionAdapters::QuotingTest#test_quoted_time_utc Expected: "1999-12-31 23:01:27" Actual: "23:01:27" ``` Related to 7c479cbf
* / / / / / / / Fix unclosed tags in `RedisCacheStore` docs [ci skip]yuuji.yaginuma2018-03-191-1/+1
|/ / / / / / /
* | | | | | | Merge pull request #32281 from bogdanvlviv/fix-rails_5_2-notes-32222Kasper Timm Hansen2018-03-181-154/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix "Ruby on Rails 5.2 Release Notes" [ci skip]
| * | | | | | | Fix "Ruby on Rails 5.2 Release Notes" [ci skip]bogdanvlviv2018-03-181-154/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove ``` * Namespace error pages' CSS selectors to stop the styles from bleeding into other pages when using Turbolinks. ([Pull Request](https://github.com/rails/rails/pull/28814)) ``` since it was backported to `5-1-stable` by 50d5baf7ed15908ce66c39cc62ce80ad99e313c3 and `5-0-stable` by d1c4a39ed796a31efc51901e7e818609fb3cb7ec. - Remove ``` * Allow irb options to be passed from `rails console` command. ([Pull Request](https://github.com/rails/rails/pull/29010)) ``` since it was backported to `5-1-stable` by e91b48348c9a33447bf1bff6e043c043cf36439f. - Remove ``` * Load environment file in `dbconsole` command. ([Pull Request](https://github.com/rails/rails/pull/29725)) ``` since it was backported to `5-1-stable` by 7f9342877a80bc9a2a283462babf7b829902dc78. - Remove ``` * Gemfile for new apps: upgrade redis-rb from ~> 3.0 to 4.0. ([Pull Request](https://github.com/rails/rails/pull/30748)) ``` since it was backported to `5-1-stable` by 37895311514a35333e5597018852eb0fe2c9eb28. - Remove ``` * Fix minitest rails plugin. The custom reporters are added only if needed. This will fix conflicts with others plugins. ([Commit](https://github.com/rails/rails/commit/ac99916fcf7bf27bb1519d4f7387c6b4c5f0463d)) ``` since it was backported to `5-1-stable` by caa76956d396a6a9feae7aa17adce784127e92cc. - Remove ``` * Add support for compatibility with redis-rb gem for 4.0 version. ([Pull Request](https://github.com/rails/rails/pull/30748)) ``` since it was backported to `5-1-stable` by 37895311514a35333e5597018852eb0fe2c9eb28. - Remove ``` * Add `action_controller_api` and `action_controller_base` load hooks to be called in `ActiveSupport.on_load`. ([Pull Request](https://github.com/rails/rails/pull/28402)) ``` since it was backported to `5-1-stable` by b9a5fd706a821401cbe3ce11d7a18daa8267588f. - Remove ``` * `driven_by` now registers poltergeist and capybara-webkit. ([Pull Request](https://github.com/rails/rails/pull/29315)) ``` since it was backported to `5-1-stable` by c5dd45119a28fb1c41de6d27d63443480c86894e. - Remove ``` * Fallback `ActionController::Parameters#to_s` to `Hash#to_s`. ([Pull Request](https://github.com/rails/rails/pull/29630)) ``` since it was backported to `5-1-stable` by c1014e435d26db867b2c15b74c9ef47ccff38edb and `5-0-stable` by 0e71fc3040edc3c28d12c07300f0162559bbe4e5. - Remove ``` * Make `take_failed_screenshot` work within engine. ([Pull Request](https://github.com/rails/rails/pull/30421)) ``` since it was backported to `5-1-stable` by 595a231029ce402445da33eec62775cbe0da97de. - Remove ``` * Fix optimized url helpers when using relative url root. ([Pull Request](https://github.com/rails/rails/pull/31261)) ``` since it was backported to `5-1-stable` by e9b77953a277a707ce1fb60e1f9963a833df9312. - Remove ``` * Update `distance_of_time_in_words` helper to display better error messages for bad input. ([Pull Request](https://github.com/rails/rails/pull/20701)) ``` since it was backported to `5-1-stable` by 2c97fbf6503c9199f3fe5ed06222e7226dc6fcd9. - Remove ``` * Generate field ids in `collection_check_boxes` and `collection_radio_buttons`. ([Pull Request](https://github.com/rails/rails/pull/29412)) ``` since it was backported to `5-1-stable` by 2d8c10a7b1066d6a577096b4a86e310f1b0d2c22. - Remove ``` * Fix issues with scopes and engine on `current_page?` method. ([Pull Request](https://github.com/rails/rails/pull/29503)) ``` since it was backported to `5-1-stable` by 2135daf0d552bbb2eca4208f8c33fb015cf052ab. - Remove ``` * Bring back proc with arity of 1 in `ActionMailer::Base.default` proc since it was supported in Rails 5.0 but not deprecated. ([Pull Request](https://github.com/rails/rails/pull/30391)) ``` since it was backported to `5-1-stable` by b2bedb149274c8490c782c62dd8ab0bbae6a9730. - Remove ``` * Add type caster to `RuntimeReflection#alias_name`. ([Pull Request](https://github.com/rails/rails/pull/28961)) ``` since it was backported to `5-1-stable` by f644e7a6fddf1b239dc1af0b0c6be8af9f776918. - Remove ``` * Loading model schema from database is now thread-safe. ([Pull Request](https://github.com/rails/rails/pull/29216)) ``` since it was backported to `5-1-stable` by 02926cfff6a403d28f83903b08ae7375fad8e836. and `5-0-stable` by 84bcfe5a6a65d3c2998d14b85b9f02560d3f9e98 - Remove ``` * Fix destroying existing object does not work well when optimistic locking enabled and `locking_column` is null in the database. ([Pull Request](https://github.com/rails/rails/pull/28926)) ``` since it was backported to `5-1-stable` by e498052c5210e886f46c61deadd161f8ea41666f. - Remove ``` * `ActiveRecord::Persistence#touch` does not work well when optimistic locking enabled and `locking_column`, without default value, is null in the database. ([Pull Request](https://github.com/rails/rails/pull/28914)) ``` since it was backported to `5-1-stable` by 1e2f63db78b9089fb7011eb954c88136f324e7c0. - Remove ``` * Previously, when building records using a `has_many :through` association, if the child records were deleted before the parent was saved, they would still be persisted. Now, if child records are deleted before the parent is saved on a `has_many :through` association, the child records will not be persisted. ([Pull Request](https://github.com/rails/rails/pull/29593)) ``` since it was backported to `5-1-stable` by a22c39e9cc08c052bb5c828b45533e5a01c896f1. - Remove ``` * Query cache was unavailable when entering the `ActiveRecord::Base.cache` block without being connected. ([Pull Request](https://github.com/rails/rails/pull/29609)) ``` since it was backported to `5-1-stable` by fd6c8cdfe69ed3a0763f0ff1dc41d2d2ee2e8752 and `5-0-stable` by 9f2532bb16b49751fbdda51846b156c3eca09054. - Remove ``` * `Relation#joins` is no longer affected by the target model's `current_scope`, with the exception of `unscoped`. ([Commit](https://github.com/rails/rails/commit/5c71000d086cc42516934415b79380c2224e1614)) ``` since it was backported to `5-1-stable` by 3630d6354cab31bb233a1f1d7b1a4d2c24aef54d. - Remove ``` * Fix `unscoped(where: [columns])` removing the wrong bind values. ([Pull Request](https://github.com/rails/rails/pull/29780)) ``` since it was backported to `5-1-stable` by d378fcb254462f9da8d921f0fa2e9b9868a7d34e. - Remove ``` * When a `has_one` association is destroyed by `dependent: destroy`, `destroyed_by_association` will now be set to the reflection, matching the behaviour of `has_many` associations. ([Pull Request](https://github.com/rails/rails/pull/29855)) ``` since it was backported to `5-1-stable` by 8254a8be81c07dbdbc2a281bab72f23f93f6b12f. - Remove ``` * Fix `COUNT(DISTINCT ...)` with `ORDER BY` and `LIMIT` to keep the existing select list. ([Pull Request](https://github.com/rails/rails/pull/29848)) ``` since it was backported to `5-1-stable` by 0e8d4edd56f44b27f33bd214aa03af60cc5d39ae. - Remove ``` * Ensure `sum` honors `distinct` on `has_many :through` associations. ([Commit](https://github.com/rails/rails/commit/566f1fd068711dfe557bef63406f8dd6d41d473d)) ``` since it was backported to `5-1-stable` by c0a1dc256144b91aee5241fad2121e85e6d8093f. - Remove ``` * Fix `COUNT(DISTINCT ...)` for `GROUP BY` with `ORDER BY` and `LIMIT`. ([Commit](https://github.com/rails/rails/commit/5668dc6b1863ef43be8f8ef0fb1d5db913085fb3)) ``` since it was backported to `5-1-stable` by 87ca68e76eec68ec61fc0d3d3bf315b4bfe45c42. - Remove ``` * MySQL: Don't lose `auto_increment: true` in the `db/schema.rb`. ([Commit](https://github.com/rails/rails/commit/9493d4553569118b2a85da84fd3a8ba2b5b2de76)) ``` since it was backported to `5-1-stable` by 8b6e694e5febdcb39f72d98ff9d5e7124cc0ca32. - Remove ``` * Fix longer sequence name detection for serial columns. ([Pull Request](https://github.com/rails/rails/pull/28339)) ``` since it was backported to `5-1-stable` by af9c1707ad49eb421cf76c1367da3efbf3c39aea and `5-0-stable` by 7025b1d8ebf694c288c71878b5229394ba3c0580. - Remove ``` * Fix `bin/rails db:setup` and `bin/rails db:test:prepare` create wrong ar_internal_metadata's data for a test database. ([Pull Request](https://github.com/rails/rails/pull/30579)) ``` since it was backported to `5-1-stable` by bb67b5f278c2dbca65b9dd03038788a4dbb4a21f and `5-0-stable` by 60437e6d3c99cbbb95a01f31d44be19f7b63e3eb. - Remove ``` * Fix conflicts `counter_cache` with `touch: true` by optimistic locking. ([Pull Request](https://github.com/rails/rails/pull/31405)) ``` since it was backported to `5-1-stable` by 5236ddaf35492513895d4a706435520e74ab723b. - Remove ``` * Fix `count(:all)` to correctly work `distinct` with custom SELECT list. ([Commit](https://github.com/rails/rails/commit/c6cd9a59f200863ccfe8ad1d9c5a8876c39b9c5c)) ``` since it was backported to `5-1-stable` by 6beb4de7dd5205d9b08ce4eedbe383cb0b18540d. - Remove ``` * Fix to invoke callbacks when using `update_attribute`. ([Commit](https://github.com/rails/rails/commit/732aa34b6e6459ad66a3d3ad107cfff75cc45160)) ``` since it was backported to `5-1-stable` by 6346683bc58b79b2745e9305e65a6f1f1a63c288. - Remove ``` * Use `count(:all)` in `HasManyAssociation#count_records` to prevent invalid SQL queries for association counting. ([Pull Request](https://github.com/rails/rails/pull/27561)) ``` since it was backported to `5-1-stable` by eef3c89e3b38c99c79decb1ec5d6854f4ab9ea18. - Remove ``` * Fix `count(:all)` with eager loading and having an order other than the driving table. ([Commit](https://github.com/rails/rails/commit/ebc09ed9ad9a04338138739226a1a92c7a2707ee)) ``` since it was backported to `5-1-stable` by 6df9b69b2363734175d8869393e83e6ce8b4d7b6. - Remove ``` * PostgreSQL: Allow pg-1.0 gem to be used with Active Record. ([Pull Request](https://github.com/rails/rails/pull/31671)) ``` since it was backported to `5-1-stable` by a9c06f61d52c7cf03dc413dd50e9a9c5ab580703. - Remove ``` * Fix that after commit callbacks on update does not triggered when optimistic locking is enabled. ([Commit](https://github.com/rails/rails/commit/7f9bd034c485c2425ae0164ff5d6374834e3aa1d)) ``` since it was backported to `5-1-stable` by aaee10e6e4fdfbc8bb7dc6169ed9deea3638c5a8. - Remove ``` * Fix regression in numericality validator when comparing Decimal and Float input values with more scale than the schema. ([Pull Request](https://github.com/rails/rails/pull/28584)) ``` since it was backported to `5-1-stable` by 5b1c3e5a8b02d0078bd2527ca0969b0d89fec433. Note that there was incorrect link to PR, original PR is https://github.com/rails/rails/pull/29249. - Remove ``` * Fix to working before/after validation callbacks on multiple contexts. ([Pull Request](https://github.com/rails/rails/pull/31483)) ``` since it was backported to `5-1-stable` by 0f7046a7f820186fd6fbe19a6142002cb8537fe6. - Remove ``` * Fix implicit coercion calculations with scalars and durations. ([Pull Request](https://github.com/rails/rails/pull/29163), [Pull Request](https://github.com/rails/rails/pull/29971)) ``` since it was backported to `5-1-stable` by 51ea27c04c60373d97e212389d587821deae6fe0, 4d82e2aad98ddf7c1a54e588288dcf1f68ad7af4. - Remove ``` * Fix modulo operations involving durations. ([Commit](https://github.com/rails/rails/commit/a54e13bd2e8fb4d6aa0aebe59271699a2d62567b)) ``` since it was backported to `5-1-stable` by 233fa7eab36e7d6fb515b2e55c699bff9858ea5f. - Remove ``` * Return all mappings for a timezone identifier in `country_zones`. ([Commit](https://github.com/rails/rails/commit/cdce6a709e1cbc98fff009effc3b1b3ce4c7e8db)) ``` since it was backported to `5-1-stable` by 0222ebbe0695fd1fbaf98e64333d9d7b285a54ed. - Remove ``` * Add support for compatibility with redis-rb gem for 4.0 version. ([Pull Request](https://github.com/rails/rails/pull/30748)) ``` since it was backported to `5-1-stable` by 37895311514a35333e5597018852eb0fe2c9eb28. Related to #32252. Related to #32222, https://github.com/rails/rails/pull/32222#discussion_r174256536. Follow up a489cc81b6aa1187b169ddccc92f4c077fe0408f.
* | | | | | | | Update Redis cache store docsStefan Wrobel2018-03-171-14/+34
| |/ / / / / / |/| | | | | |
* | | | | | | Merge pull request #32275 from elainefang/fix-grammarGeorge Claghorn2018-03-161-4/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix grammar in Getting Started with Rails
| * | | | | | | Fix grammar in Getting Started with Railsef7182018-03-161-4/+4
|/ / / / / / /
* | | | | | | Merge pull request #32271 from eileencodes/fix-three-tier-default-connectionEileen M. Uchitelle2018-03-164-2/+53
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix default connection handling with three-tier config
| * | | | | | | Switch dbconsole config loader checkeileencodes2018-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a three-tier config environment `configurations[environment].presence` will return `{ :primary => { :key => value, :key => value }, :secondary => { :key => value, :key => value} }, which means it's not given a single config to connect to. If we flip these however it will connect to primary because that's the default connection, and on a two tier it will be `nil` so the code will select the connection from the configurations rather than the connection.
| * | | | | | | Fix connection handling with three-tier configeileencodes2018-03-163-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you had a three-tier config, the `establish_connection` that's called in the Railtie on load can't figure out how to access the default configuration. This is because Rails assumes that the config is the first value in the hash and always associated with the key from the environment. With a three tier config however we need to go one level deeper. This commit includes 2 changes. 1) removes a line from `resolve_all` which was parsing out the the environment from the config so instead of getting ``` { :development => { :primary => { :database => "whatever" } }, :animals => { :database => "whatever-animals" } }, etc with test / prod } ``` We'd instead end up with a config that had no attachment to it's envioronment. ``` { :primary => { :database => "whatever" } :animals => { :database => "whatever-animals" } etc - without test and prod } ``` Not only did this mean that Active Record didn't know how to establish a connection, it didn't have the other necessary configs along with it in the configs list. So fix this I removed the line that deletes these configs. The second thing this commit changes is adding this line to `establish_connection` ``` spec = spec[spec_name.to_sym] if spec[spec_name.to_sym] ``` When you have a three-tier config and don't pass any hash/symbol/env etc to `establish_connection` the resolver will automatically return both the primary and secondary (in this case animals db) configurations. We'll get an `database configuration does not specify adapter` error because AR will try to establish a connection on the `primary` key rather than the `primary` key's config. It assumes that the `development` or default env automatically will return a config hash, but with a three-tier config we actually get a key and config `primary => config`. This fix is a bit of a bandaid because it's not the "correct" way to handle this situation, but it does solve our immediate problem. The new code here is saying "if the config returned from the resolver (I know it's called spec in here but we interchange our meanings a LOT and what is returned is a three-tier config) has a key matching the "primary" spec name, grab the config from the spec and pass that to the estalbish_connection method". This works because if we pass `:animals` or a hash, or `:primary` we'll already have the correct configuration to connect with. This fixes the case where we want Rail to connect with the default connection. Coming soon is a refactoring that should eliminate the need to do this but I need this fix in order to write the multi-db rake tasks that I promised in my RailsConf submission. `@tenderlove` and I are working on the refactoring of the internals for connection management but it won't be ready for a few weeks and this issue has been blocking progress.
* | | | | | | | :scissors:Rafael Mendonça França2018-03-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | Fix multiline expression indexes for postgresql (#31621)fatkodima2018-03-163-3/+3
| | | | | | | |
* | | | | | | | Don't need to include in the changelog something that was release in 5.2Rafael Mendonça França2018-03-151-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | Check exclude before flagging cookies as secure in ActionDispatch::SSL (#32262)Catherine Khuu2018-03-153-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Check exclude before flagging cookies as secure. * Update comments in ActionDispatch::SSL. [Catherine Khuu + Rafael Mendonça França]