aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/dependency_tracker.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen string literal in actionview/Kir Shatrov2017-07-241-0/+2
|
* [Action View] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty linesRyuta Kamizono2016-08-071-1/+0
|
* applies new string literal convention in actionview/libXavier Noria2016-08-061-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* sort templates after looking them up in the from the paths cacheAaron Patterson2016-02-101-4/+4
| | | | | | | | | | | | | | The view paths cache will eventually query the filesystem when looking up templates: https://github.com/rails/rails/blob/2db347bebc9d3f39b3c5e274b7c9beecfce73913/actionview/lib/action_view/template/resolver.rb#L224-L230 The order in which files are returned is file system dependent. Since the template digest [depends on its children](https://github.com/rails/rails/blob/2db347bebc9d3f39b3c5e274b7c9beecfce73913/actionview/lib/action_view/digestor.rb#L109-L115), the order of the dependencies will impact the fingerprint. This commit sorts the wildcard dependencies so that we get a consistent hash. Fixes #23592
* check `supports_view_paths?` at registration timeAaron Patterson2016-02-101-7/+9
| | | | | | | | | If we check the conditional at registration time, then we can avoid the conditional at runtime. This commit checks for view path support when the handler is registered so that runtime calls to `find_dependencies` won't need to check the conditional. The idea is that `register_tracker` is called only once where `find_dependencies` may be called many times.
* Require only necessary concurrent-ruby classes.Jerry D'Antonio2015-11-041-1/+1
|
* Replaced `ThreadSafe::Map` with successor `Concurrent::Map`.Jerry D'Antonio2015-09-191-2/+2
| | | | | | | The thread_safe gem is being deprecated and all its code has been merged into the concurrent-ruby gem. The new class, Concurrent::Map, is exactly the same as its predecessor except for fixes to two bugs discovered during the merge.
* Add wildcard template dependencies.Kasper Timm Hansen2015-07-261-9/+29
|
* Fix dependency tracker bugJuho Leinonen2015-02-251-4/+15
|
* Fix that render layout should also be picked up by the template dependency ↵David Heinemeier Hansson2014-07-251-4/+10
| | | | tracker, but only half-ways. You can add that layout option on the same render call, and both templates should be added to the dependency tree. But thats going to require a more serious rework of the tracker. Please do help fix this part of it too. For now, render layout needs to be on its own line.
* Avoid scanning multiple render calls as a single match.João Britto2014-01-091-17/+19
| | | | Each chunk of text coming after `render` is now handled individually as a possible list of arguments.
* Improve ERB dependency detection.João Britto2014-01-091-17/+57
| | | | | | | | | | | The current implementation can't handle some special cases of oddly-formatted Ruby. Now we are able to detect them: * Multi-line arguments on the `render` call * Strings containing quotes, e.g. `"something's wrong"` * Multiple kinds of identifiers - instance variables, class variables and globals * Method chains as arguments for the `render` call Also, this fix reduces the rate of "false positives" which showed up when we had calls/access to identifiers containing `render`, like `surrender` and `rendering`.
* Move actionpack/lib/action_view* into actionview/libPiotr Sarnacki2013-06-201-0/+93