- 06 2月, 2019 5 次提交
-
-
由 Gannon McGibbon 提交于
Closes #34975.
-
由 Aaron Patterson 提交于
Improve regexp of `html_safe_translation_key?`
-
由 Aaron Patterson 提交于
Set sqlite3 gem version explicitly in generated Gemfile
-
由 Ryuta Kamizono 提交于
Chaining named scope is no longer leaking to class level querying methods
-
由 Sergey Ponomarev 提交于
-
- 05 2月, 2019 21 次提交
-
-
由 Ryuta Kamizono 提交于
Active Record uses `scoping` to delegate to named scopes from relations for propagating the chaining source scope. It was needed to restore the source scope in named scopes, but it was caused undesired behavior that pollute all class level querying methods. Example: ```ruby class Topic < ActiveRecord::Base scope :toplevel, -> { where(parent_id: nil) } scope :children, -> { where.not(parent_id: nil) } scope :has_children, -> { where(id: Topic.children.select(:parent_id)) } end # Works as expected. Topic.toplevel.where(id: Topic.children.select(:parent_id)) # Doesn't work due to leaking `toplevel` to `Topic.children`. Topic.toplevel.has_children ``` Since #29301, the receiver in named scopes has changed from the model class to the chaining source scope, so the polluting class level querying methods is no longer required for that purpose. Fixes #14003.
-
由 Matthew Draper 提交于
If they're not set we'll still fall back to localhost, but this makes it possible to run the tests against a remote Postgres / Redis / whatever.
-
由 Kazuhiro NISHIYAMA 提交于
- Use `\z` instead of `$` - Use character class instead of alternation - Optimize alternation order
-
由 George Claghorn 提交于
Fix NameError : Make debug exceptions works in an environment where ActiveStorage is not loaded.
-
由 Ryuta Kamizono 提交于
Bugfix association loading behavior when counter cache is zero
-
由 kurosawat 提交于
NameError: uninitialized constant ActionView::CompiledTemplates::ActiveStorage
-
由 Bogdan Gusiev 提交于
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
-
由 yuuji.yaginuma 提交于
Follow up to #35154.
-
由 Rafael França 提交于
Specify sqlite gem version explicitly in bug report templates
-
由 Rafael Mendonça França 提交于
Support before_reset callback in CurrentAttributes
-
由 Sergey Ponomarev 提交于
-
由 Aaron Patterson 提交于
Relax sqlite3 version dependency
-
由 Aaron Patterson 提交于
Refs: rails/jbuilder#452
-
由 Rafael Mendonça França 提交于
With this benchmark: require "bundler/setup" require "active_record" require "benchmark/ips" # This connection will do for database-independent bug reports. ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:") ActiveRecord::Schema.define do create_table :posts, force: true do |t| end end class Post < ActiveRecord::Base end new_post = Post.new Benchmark.ips do |b| b.report("present?") do new_post.present? end b.report("blank?") do new_post.blank? end end Before: Warming up -------------------------------------- present? 52.147k i/100ms blank? 53.077k i/100ms Calculating ------------------------------------- present? 580.184k (±21.8%) i/s - 2.555M in 5.427085s blank? 601.537k (± 9.2%) i/s - 2.972M in 5.003503s After: Warming up -------------------------------------- present? 378.235k i/100ms blank? 375.476k i/100ms Calculating ------------------------------------- present? 17.381M (± 7.5%) i/s - 86.238M in 5.001815s blank? 17.877M (± 6.4%) i/s - 88.988M in 5.004634s This improvement is mostly because those methods were hitting `method_missing` on a lot of levels to be able to return the value. To avoid all this stack walking we are short-circuiting those methods. Closes #35059.
-
由 Sergey Ponomarev 提交于
-
由 Rafael França 提交于
Cookie doesn't expire anymore unless a flag is set:
-
由 Vipul A M 提交于
Add a link to where "inquiry" is defined in ActiveSupport docs [ci skip]
-
由 Stephen Pike 提交于
[ci skip]
-
由 Gannon McGibbon 提交于
Cleanup the whitelisting references after #33145
-
- 04 2月, 2019 8 次提交
-
-
由 Eileen M. Uchitelle 提交于
Update template missing text in Guide
-
由 utilum 提交于
Changes the Getting Started guide explanation for `ActionController::MissingExactTemplate` error, to reflect the current message. Follow up for #29286, #35148 [ci skip]
-
由 garytaylor 提交于
-
由 Eileen M. Uchitelle 提交于
Invalidate all query caches for current thread
-
由 Eileen M. Uchitelle 提交于
Add ability to change the names of the default handlers
-
由 Edouard CHIN 提交于
- There is a regression in 6.0 introduced by #32937 where cookie doesn't expire anymore unless the new `use_cookies_with_metadata` configuration is set to `true`. This causes issue for app migration from 5.2 to 6.0 because the `use_cookies_with_metadata` flag can't be set to true until all servers are running on 6.0. Here is a small reproduction script that you can run in the console ```ruby ActionDispatch::Cookies request = ActionDispatch::Request.empty request.env["action_dispatch.key_generator"] = ActiveSupport::KeyGenerator.new('1234567890') request.env["action_dispatch.signed_cookie_salt"] = 'signed cookie' request.env["action_dispatch.cookies_rotations"] = ActiveSupport::Messages::RotationConfiguration.new request.env["action_dispatch.use_authenticated_cookie_encryption"] = true signed_cookie = request.cookie_jar.signed signed_cookie[:foobar] = { value: '123', expires: 1.day.ago } p signed_cookie[:foobar] ```
-
由 Kasper Timm Hansen 提交于
Fix and update template_missing image in guide
-
由 utilum 提交于
This commit updates the Missing Template image in the Getting Started Guide. The new image displays the current error message. Additionally: - New image is a PNG file, whereas the current image is in fact a misnamed JPEG. - New image is smaller. Before: ``` $ file --mime -b template_is_missing_articles_new.png image/jpeg; charset=binary $ du -h template_is_missing_articles_new.png 464K template_is_missing_articles_new.png ``` After: ``` $ file --mime -b template_is_missing_articles_new.png image/png; charset=binary $ du -h template_is_missing_articles_new.png 28K template_is_missing_articles_new.png ``` [ci-skip]
-
- 03 2月, 2019 2 次提交
-
-
由 Genadi Samokovarov 提交于
During the development of #33145, I have named a few concepts in the code as `whitelisted`. We decided to stay away from the term and I adjusted most of the code afterwards, but here are the cases I forgot to change. I also found a case in the API guide that we could have cleaned up as well. [ci skip]
-
由 Gannon McGibbon 提交于
Hint at advanced options for foreign_key
-
- 02 2月, 2019 4 次提交
-
-
由 Rafael França 提交于
Use consistent hash syntax for routes
-
由 Aaron Patterson 提交于
Introduce a file type template
-
由 Andy Waite 提交于
[ci skip]
-
由 Aaron Patterson 提交于
This commit passes the mutated source to the template handler as a parameter and deprecates the old handlers. Old handlers required that templates contain a reference to mutated source code, but we would like to make template objects "read only". This change lets the template remain "read only" while still giving template handlers access to the source code after mutations.
-