- 05 1月, 2020 6 次提交
-
-
-
由 Rafael França 提交于
Include primary key in insert_all conflict target if specified
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
Fix adding non-null column to existing SQLite3 table
-
由 Mike Vastola 提交于
Forces adding the column by way of copying the table due to lack of support in SQLite3 adapter. Fixes #38129
-
- 04 1月, 2020 13 次提交
-
-
由 Ryuta Kamizono 提交于
Avoid assigning duplicate values to join_values
-
由 Ryuta Kamizono 提交于
-
由 sinsoku 提交于
-
由 sinsoku 提交于
The ArgumentError occurs even though structures is compatible. Because some query methods keep duplicate values. For example, the behavior of `joins` method is as following: ```ruby relation = Post.joins(:author).joins(:author) relation.joins_values #=> [:author, :author] relation.or(Post.joins(:author)) #=> ArgumentError: Relation passed to #or must be structurally compatible. Incompatible values: [:joins] ``` This commit changes to not keep duplicate values. Fixes #38052
-
由 Rafael França 提交于
Update "The Hard Way" setup for Arch Linux
-
由 Keeyan Nejad 提交于
MariaDB cannot be started on Arch Linux before running a command to create the database files See https://wiki.archlinux.org/index.php/MariaDB#Installation It also appears that memcached is not started by default on Arch Linux, so it has been added to the systemctl startup step. This PR adds that step when setting up on Arch Linux
-
由 Rafael França 提交于
Pass env_name as a string in test databases
-
由 John Crepezzi 提交于
In 154abcab we switched from using `Rails.env` to fetch the `env_name` to `ActiveRecord::ConnectionHandling::DEFAULT_ENV.call.to_sym` which changed the type from a `String` to a `Symbol`. This commit brings things back to the original state, so we can find the configurations correctly! It also modifies the configuration in the configurations array, so that future connections can find the database with the updated keyword value.
-
由 Rafael Mendonça França 提交于
When all IPs are trusted, use the furthest away
-
由 Keenan Brock 提交于
-
由 Rafael França 提交于
Fix regression where AJ#perform_now doesn't return the job's value:
-
由 Edouard CHIN 提交于
- I made a change in 0d3aec49 to output a log if a job was aborted in a before callbacks. I didn't take in consideration that a job could return a falsy value and thus it would wrongly log that the job was aborted. This fixes the problem by checking if the callback chain was halted rather than the return value of the job.
-
由 Edouard CHIN 提交于
- Fix #38040
-
- 03 1月, 2020 10 次提交
-
-
由 Matthew Draper 提交于
Scenario: we have a REMOTE_ADDR of `127.0.0.1`, and X-Forwarded-For is `A, B, C`. Without any relevant trust, the `remote_ip` is `C`. If `C` is trusted, then the `remote_ip` is `B`. If `B` and `C` are trusted, then the `remote_ip` is `A`. If all of `A`, `B`, and `C` are trusted, then the `remote_ip` should still be `A`: if our trust was sufficient to get that far out before, trusting something else should not have us fall back to `127.0.0.1`. It is this last situation that we're correcting here: We trust `A` to give us accurate X-Forwarded-For information, yet it has chosen to leave it unset. Therefore, `A` is telling us that it is itself the client.
-
由 Ryuta Kamizono 提交于
-
由 Rafael França 提交于
Fix regression, enforce fresh ETag header after collection contents change
-
由 Aaron Lipman 提交于
Add ActiveRecord::Relation#cache_key_with_version. This method will be used by ActionController::ConditionalGet to ensure that when collection cache versioning is enabled, requests using ConditionalGet don't return the same ETag header after a collection is modified. Prior to the introduction of collection cache versioning in 4f2ac80d, all collection cache keys included a version. However, with cache versioning enabled, collection cache keys remain constant. In turn, ETag headers remain constant, rendering them ineffective. This commit takes the cache_key_with_version method used for individual Active Record objects (from aa8749eb), and adds it to collections.
-
由 Rafael França 提交于
Add `ActionDispatch::HostAuthorization` to "Configuring Middleware" guide [ci skip]
-
由 Rafael França 提交于
Add to the log format "*/*" if using a not found format:
-
由 Rafael França 提交于
Separate with space between table name and columns list in SQL of insert_all
-
由 Rafael França 提交于
Mime::Mimes#symbols should return a always up to date reference:
-
The rendering template is processing as */* but in the log is "Processing by Controller#action as " This change add the */* for the log and showing as "Processing by Controller#action as */*" when there not founds for the extension of format.
-
由 Edouard CHIN 提交于
- Original issue was reported in https://github.com/rails/rails/issues/38094 and a fix attempted in https://github.com/rails/rails/pull/38126 but it's not the proper fix I think. TL;DR Is that `ActionView::Base.default_formats` holds a copy of mime symbols at the time ActionView::Base is loaded. So if you try to register mime types after ActionView Base is loaded then it won't work. ```ruby ActionView::Base.default_formats ||= Mime::SET.symbols # Note that this is automatically done when ActionView get loaded https://github.com/rails/rails/blob/22483b86a6c779743b30e2f23bb46accfbf96b28/actionpack/lib/action_dispatch.rb#L117 Mime::Type.register_alias "application/xhtml+xml", :foobar puts ActionView::base.defaults_formats.include?(:foobar) # => false ``` Same issue if you try to unregister a mime after ActionView is loaded. That's what was happening in the flaky test: ``` Mime::Type.register_alias "application/xhtml+xml", :foobar ActionView::Base.default_formats ||= Mime::SET.symbols puts ActionView::base.defaults_formats.include?(:foobar) # => true Mime::Type.unregister(:foobar) puts ActionView::base.defaults_formats.include?(:foobar) # => true ``` ### Solution Return a refence to `@symbols` which is updated each time a new mime is registered/unregistered.
-
- 02 1月, 2020 8 次提交
-
-
由 bogdanvlviv 提交于
This commit copies info from https://github.com/rails/rails/pull/33145 ([an excellent changelog](https://github.com/rails/rails/blob/6-0-stable/railties/CHANGELOG.md)) to our guides. Closes https://github.com/rails/rails/issues/36959 Not sure whether there is a need mentioning `config.hosts` in the "Upgrading to Rails 6.0" guide since it is configured to work in the development environment by default and we guide how to deal with "blocked host" issue, see: https://github.com/rails/rails/blob/6-0-stable/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb I would like to backport this to `6-0-stable` so users will be able to find info about `ActionDispatch::HostAuthorization` middleware and how to configure it. Give credit to @gsamokovarov since I copied the info from the changelog. <3 [bogdanvlviv, Genadi Samokovarov]
-
由 Ryuta Kamizono 提交于
Closes #38132
-
由 Takafumi ONAKA 提交于
In arel, there is a space between the table name and columns list when INSERT. https://github.com/rails/rails/blob/3c28e79b615f6937f5abdc433ff634d15cf2466f/activerecord/lib/arel/visitors/to_sql.rb#L56 ```ruby User.create!(name: "foo") # INSERT INTO `users` (`name`) VALUES ('foo') ^^^^^^^^^^^^^^^^ ``` But SQL of insert_all is not separated. ```ruby User.insert_all!([{name: "foo"}]) # INSERT INTO `users`(`name`) VALUES ('foo') ^^^^^^^^^^^^^^^ ``` This is not a problem (because it is correct as SQL), but fixing this will make unified behavior. A known issue is that database_rewinder fails to parse table name on insert_all. https://github.com/amatsuda/database_rewinder/blob/v0.9.1/lib/database_rewinder.rb#L51-L54 ```ruby statement = "INSERT INTO `users`(`name`) VALUES ('foo')" match = statement.match(/\A\s*INSERT(?:\s+IGNORE)?(?:\s+INTO)?\s+(?:\.*[`"]?([^.\s`"]+)[`"]?)*/i) # => #<MatchData "INSERT INTO `users`(`name`)" 1:")"> # Expected behavior is # => #<MatchData "INSERT INTO `users`" 1:"users"> ```
-
由 Ryuta Kamizono 提交于
Use travel_to to in date_helper_test.rb.
-
由 Matthew Draper 提交于
Remove Travis CI files
-
由 Josef Šimánek 提交于
-
由 Yasuo Honda 提交于
Rails CI has been running at Buildkite for 9 month. Refer https://github.com/rails/rails/commit/e485c14a3ee29ee486324a96545abf964d428101
-
由 Yasuo Honda 提交于
Rather than replace `ENV['TRAVIS']` with `ENV['CI']`, I think we can remove this condition because `ENV['TRAVIS']` is not valid at Buildkite then Rails CI has been running with `PROCESS_COUNT` about 9 month since this https://github.com/rails/rails/commit/e485c14a3ee29ee486324a96545abf964d428101
-
- 01 1月, 2020 1 次提交
-
-
由 Abhay Nikam 提交于
-
- 31 12月, 2019 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-