- 14 1月, 2020 15 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
[ci skip]
-
由 Ryuta Kamizono 提交于
Remove an empty line from generated migration
-
由 Prem Sichanugrist 提交于
Currently, if you run `rails g migration remove_column_from_models`, there is an empty line before `remove_column` line because we forgot to use `-%>` in the template: $ bin/rails g migration remove_title_from_posts title:string invoke active_record create db/migrate/20200114061235_remove_title_from_posts.rb $ cat db/migrate/20200114061235_remove_title_from_posts.rb class RemoveTitleFromPosts < ActiveRecord::Migration[6.1] def change remove_column :posts, :title, :string end end This commit adds the missing `-` in front of `-%>` to make it removes the empty line.
-
由 John Hawthorn 提交于
Pass Benchmark.ms block through to realtime
-
由 John Hawthorn 提交于
Avoids pushing an extra stack frame.
-
由 John Hawthorn 提交于
Fix CI error with minitest 5.14
-
由 John Hawthorn 提交于
Follow up to 2bf1c17c, which still left this one failure. Minitest 5.14 uses error instead of exception, so exception had been changed to just be the same UnexpectedError instance and losing us the actual error message. This also switches to initializing a new UnexpectedError instance because previously, for reasons I can't quite figure out, reusing the same instance would still give us a DRbConnError.
-
由 Gannon McGibbon 提交于
Add scale support to ActiveRecord::Validations::NumericalityValidator
-
由 Eileen M. Uchitelle 提交于
Fix NoMethodError on ActiveSupport::Cache::RedisCacheStore#clear with…
-
由 Ryuta Kamizono 提交于
Remove Ruby 2.7 warning on arg forwarding
-
由 Kevin Deisz 提交于
Kwargs need to be forwarded for this method_missing to avoid warnings in Ruby 2.7.
-
由 Gannon McGibbon 提交于
-
- 12 1月, 2020 6 次提交
-
-
-
由 Ryuta Kamizono 提交于
https://github.com/seattlerb/minitest/commit/5802aa08280a3609b684e0ebef95dabfbd3ec9ff https://github.com/seattlerb/minitest/pull/809#discussion_r332399750 To support both 5.13.0 and 5.14.0, use `#initialize` instead.
-
-
由 Ryuta Kamizono 提交于
rack 2.1.0 changed expires date format from rfc2822 to httpdate
-
由 Kasper Timm Hansen 提交于
Reduce number of created objects in Hash#to_json
-
由 Kasper Timm Hansen 提交于
Finding Orphan Records
-
- 11 1月, 2020 13 次提交
-
-
由 Tom Rossi 提交于
-
由 Eugene Kenny 提交于
Followup to 9256ae8a. Since the result of `as_json` is typically encoded with `to_json`, this patch should save the same number of allocations as the previous one.
-
-
由 Aaron Patterson 提交于
Do not re-parse PATH_INFO when validating authenticity token
-
由 Rafael França 提交于
Put dev dependencies in generated plugin Gemfile
-
由 Henrique Morato 提交于
-
由 Aaron Patterson 提交于
PATH_INFO will never contain query parameters (that is the contract with the webserver), so there is no reason to call URI.parse on it. In addition, clients can send garbage paths that raise an exception when being parsed rather than just failing the auth token check.
-
由 abcang 提交于
* Fix ActionController::TestSession#id to return Rack::Session::SessionId instance * test SessionId#public_id * test session["session_id"] Co-authored-by: NBenjamin Quorning <22333+bquorning@users.noreply.github.com>
-
由 Eileen M. Uchitelle 提交于
Fix NumericalityValidator when precision is too high:
-
由 Edouard CHIN 提交于
- When a column with a precision that is higher than what the system allows, it would result in an error: ```sh require "bigdecimal/util" 123.4.to_d(20) => ArgumentError, precision is too high ``` To fix that problem we need to check what the max number of digits a Float is allowed to have, we can achieve that with `BigDecimal.double_fig` Fix #38209
-
由 Ryuta Kamizono 提交于
Reduce number of created objects in Hash#as_json
-
由 Eileen M. Uchitelle 提交于
Merge pull request #38204 from eileencodes/fix-reading-conn-so-text-fixtures-raise-when-writing-on-replica Ensure the reading connection always raises if we try to write
-
由 Rafael França 提交于
Fix numericality validator when defined on abstract class:
-
- 10 1月, 2020 6 次提交
-
-
由 Edouard CHIN 提交于
- ### Problem It's no longer possible to define a numeric validation on abstract class: ```ruby class AnimalsBase < ApplicationRecord self.abstract_class = true validates :age, numericality: { min: 18 } end class Dog < AnimalsBase end Dog.create!(age: 0) => ActiveRecord::TableNotSpecified: Dog has no table configured. Set one with Dog.table_name= ``` ### Solution Instead of trying to get the type for attribute on the class defining the validation, get it from the record being validated.
-
由 Ryuta Kamizono 提交于
Typo fix of visbility.
-
由 alkeshghorpade 提交于
-
由 Akihito Tsukamoto 提交于
-
由 eileencodes 提交于
Since test fixtures share connections (due to transactional tests) we end up overwriting the reading configuration so Rails doesn't recognize it as a replica connection. This change ensures that if we're using the `reading` role that connections will always have prevent writes turned on. If you need a replica connection that does not block writes, you should use a different role name other than `:reading`. The db selector test and connection handlers test have been updated to test for these changes. In the db selector test we don't always have a writing handler so I updated test fixtures to return if that's nil. Lastly one test needed to be updated to use a different handler name due to it needing to write to successfully test what it needs to test. Fixes #37765
-
由 eileencodes 提交于
This test wasn't correct. If we're calling `resolver.read` and want to actually read from the replicas then the role would be reading not writing. This was because the session store needed to be changed so that we actually are "reading from the replicas" instead of reading from the primary.
-