aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Refactor around scopingRyuta Kamizono2019-02-075-18/+16
| | | | | | | | | | | | | | | | | | Don't use `false` as special value to skip to find inherited scope, we could use `skip_inherited_scope = true`, and move `_scoping` back on Relation.
* | | Merge pull request #35036 from rails/av-base-subclassAaron Patterson2019-02-0619-66/+137
|\ \ \ | | | | | | | | Move compiled ERB to an AV::Base subclass
| * | | Fix deprecation warnings and call superAaron Patterson2019-02-061-2/+2
| | | |
| * | | Fix some typos!Aaron Patterson2019-02-062-1/+5
| | | |
| * | | Add a message to help allocate AV::Base instancesAaron Patterson2019-02-061-1/+5
| | | |
| * | | Deprecate finalizer configuration (it doesn't do anything)Aaron Patterson2019-02-064-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | Revert "Remove finalizer and configuration" This reverts commit 9e7b4a3173788ea43b11e74a4d2f69a5f1565daa.
| * | | Rename method so it is more descriptiveAaron Patterson2019-02-061-3/+3
| | | |
| * | | Pull generated methods up in to the anonymous subclassAaron Patterson2019-02-063-19/+8
| | | | | | | | | | | | | | | | Then we don't need the extra module.
| * | | 🚨 Make the cops happy 🚨Aaron Patterson2019-02-063-3/+3
| | | |
| * | | Remove finalizer and configurationAaron Patterson2019-02-065-50/+0
| | | |
| * | | Regenerate AV::Base subclass when DetailsKey gets clearedAaron Patterson2019-02-062-3/+29
| | | |
| * | | Move templates to an anonymous subclass of AV::BaseAaron Patterson2019-02-0613-35/+84
| | | | | | | | | | | | | | | | | | | | Now we can throw away the subclass and the generated methods will get GC'd too
* | | | Allow skipping incineration of processed emailsPratik2019-02-066-1/+23
| |/ / |/| |
* | | Merge pull request #35174 from ypresto/fix-concat-retvalRyuta Kamizono2019-02-064-35/+10
|\ \ \ | | | | | | | | Fix `CollectionProxy#concat` to return self by alias it to `#<<`
| * | | Fix `CollectionProxy#concat` to return self by alias it to `#<<`Yuya Tanaka2019-02-064-35/+10
| | | | | | | | | | | | | | | | Formerly it was returning arguments (`records` array).
* | | | Merge pull request #34971 from y-yagi/improve_railties_testYuji Yaginuma2019-02-062-4/+24
|\ \ \ \ | | | | | | | | | | Improve execution time of railties' test
| * | | | Preload all component gemsyuuji.yaginuma2019-02-061-0/+2
| | | | | | | | | | | | | | | | | | | | To avoid running require individually.
| * | | | Restrict frameworks to load in engine testyuuji.yaginuma2019-02-061-4/+22
| |/ / / | | | | | | | | | | | | | | | | For avoid to affect tests. Also, `action_text:install` task execute `yarn add`. This is an expensive and should be avoided if it is not needed.
* | | | Merge pull request #35173 from betterzega/masterYuji Yaginuma2019-02-061-1/+1
|\ \ \ \ | |/ / / |/| | | Update terminal-to-html inline images url in ScreenshotHelper documentation
| * | | Update terminal-to-html inline images url in ScreenshotHelperbetterzega2019-02-051-1/+1
|/ / /
* | | Merge pull request #35162 from silppuri/fix-incorrectly-matching-unachored-pathsAaron Patterson2019-02-053-12/+18
|\ \ \ | |/ / |/| | Fix incorrectly matching unanchored paths
| * | Restrict matching with word boundary or end of stringPetri Avikainen2019-02-052-12/+12
| | |
| * | Define word boundary for unanchored path regexpPetri Avikainen2019-02-053-12/+18
| | |
* | | Merge pull request #35171 from rails/speed-up-partialsAaron Patterson2019-02-053-19/+41
|\ \ \ | | | | | | | | Speed up partial rendering by caching "variable" calculation
| * | | Speed up partial rendering by caching "variable" calculationAaron Patterson2019-02-053-19/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit speeds up rendering partials by caching the variable name calculation on the template. The variable name is based on the "virtual path" used for looking up the template. The same virtual path information lives on the template, so we can just ask the cached template object for the variable. This benchmark takes a couple files, so I'll cat them below: ``` [aaron@TC ~/g/r/actionview (speed-up-partials)]$ cat render_benchmark.rb require "benchmark/ips" require "action_view" require "action_pack" require "action_controller" class TestController < ActionController::Base end TestController.view_paths = [File.expand_path("test/benchmarks")] controller_view = TestController.new.view_context result = Benchmark.ips do |x| x.report("render") do controller_view.render("many_partials") end end [aaron@TC ~/g/r/actionview (speed-up-partials)]$ cat test/benchmarks/test/_many_partials.html.erb Looping: <ul> <% 100.times do |i| %> <%= render partial: "list_item", locals: { i: i } %> <% end %> </ul> [aaron@TC ~/g/r/actionview (speed-up-partials)]$ cat test/benchmarks/test/_list_item.html.erb <li>Number: <%= i %></li> ``` Benchmark results (master): ``` [aaron@TC ~/g/r/actionview (master)]$ be ruby render_benchmark.rb Warming up -------------------------------------- render 41.000 i/100ms Calculating ------------------------------------- render 424.269 (± 3.5%) i/s - 2.132k in 5.031455s ``` Benchmark results (this branch): ``` [aaron@TC ~/g/r/actionview (speed-up-partials)]$ be ruby render_benchmark.rb Warming up -------------------------------------- render 50.000 i/100ms Calculating ------------------------------------- render 521.862 (± 3.8%) i/s - 2.650k in 5.085885s ```
* | | | Merge pull request #35170 from palkan/fix/encrypted-fileRafael França2019-02-051-1/+2
|\ \ \ \ | | | | | | | | | | Add missing `require "tmpdir"` in ActiveSupport::EncryptedFile
| * | | | Add missing `require "tmpdir"` in ActiveSupport::EncryptedFileVladimir Dementyev2019-02-051-1/+2
| | | | |
* | | | | Relation no longer respond to Arel methodsRyuta Kamizono2019-02-063-19/+8
| | | | | | | | | | | | | | | | | | | | This follows up d97980a16d76ad190042b4d8578109714e9c53d0.
* | | | | Merge branch 'float_dom_ids'Gannon McGibbon2019-02-053-5/+27
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Closes #34975.
| * | | | | Fix unique DOM IDs for collection inputsMark Edmondson2019-01-253-5/+26
| | | | | |
* | | | | | Merge pull request #35166 from znz/improve-regexpAaron Patterson2019-02-051-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Improve regexp of `html_safe_translation_key?`
| * | | | | | Improve regexp of `html_safe_translation_key?`Kazuhiro NISHIYAMA2019-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use `\z` instead of `$` - Use character class instead of alternation - Optimize alternation order
* | | | | | | Merge pull request #35169 from sponomarev/chore/specify-sqlite-in-gemfileAaron Patterson2019-02-052-1/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Set sqlite3 gem version explicitly in generated Gemfile
| * | | | | | | Set sqlite3 gem version explicitly in generated GemfileSergey Ponomarev2019-02-052-1/+2
| | | | | | | |
* | | | | | | | Merge pull request #32380 from kamipo/fix_leaking_scopeRyuta Kamizono2019-02-067-8/+32
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Chaining named scope is no longer leaking to class level querying methods
| * | | | | | | Chaining named scope is no longer leaking to class level querying methodsRyuta Kamizono2019-02-067-8/+32
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* / | | | | | Respect ENV variables when finding DBs etc for the test suiteMatthew Draper2019-02-0617-36/+114
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Merge pull request #35139 from 7coAim/fix_debug_exceptionsGeorge Claghorn2019-02-053-2/+6
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Fix NameError : Make debug exceptions works in an environment where ActiveStorage is not loaded.
| * | | | | fix NameErrorkurosawat2019-02-053-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | NameError: uninitialized constant ActionView::CompiledTemplates::ActiveStorage
* | | | | | Merge pull request #35127 from bogdan/counter-cache-loadingRyuta Kamizono2019-02-053-21/+48
|\ \ \ \ \ \ | | | | | | | | | | | | | | Bugfix association loading behavior when counter cache is zero
| * | | | | | Bugfix association loading behavior when counter cache is zeroBogdan Gusiev2019-02-053-21/+48
| | | | | | |
* | | | | | | Use ES6 short styleDavid Heinemeier Hansson2019-02-041-3/+3
| | | | | | |
* | | | | | | Match rails generator outputDavid Heinemeier Hansson2019-02-041-2/+2
| | | | | | |
* | | | | | | Update Gemfile.lock to reflect `sqlite3` updateyuuji.yaginuma2019-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up to #35154.
* | | | | | | Merge pull request #35157 from sponomarev/fix/big-report-templates-sqliteRafael França2019-02-042-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Specify sqlite gem version explicitly in bug report templates
| * | | | | | | Specify sqlite gem version explicitly in version-specific bug report templatesSergey Ponomarev2019-02-042-2/+2
| | | | | | | |
* | | | | | | | Merge pull request #35063 from rosa/current-before-reset-callbackRafael Mendonça França2019-02-043-9/+41
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | Support before_reset callback in CurrentAttributes
| * | | | | | | Support before_reset callback in CurrentAttributesRosa Gutierrez2019-01-303-8/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful when we need to do some work associated to `Current.reset` but that work depends on the values of the current attributes themselves. This cannot be done in the supported `resets` callback because when the block is executed, CurrentAttributes's instance has already been reset. For symmetry, `after_reset` is defined as alias of `resets`.
* | | | | | | | Merge pull request #35154 from sponomarev/chore/sqlite1.4Aaron Patterson2019-02-042-2/+2
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | Relax sqlite3 version dependency
| * | | | | | | Relax sqlite3 version dependencySergey Ponomarev2019-02-042-2/+2
| | |_|_|_|/ / | |/| | | | |