Commit Graph

10 Commits

Author SHA1 Message Date
bogdanvlviv
f1de019993
Include ActiveSupport::Testing::MethodCallAssertions in railties/test/isolation/abstract_unit.rb
Related to #33102
2018-06-09 00:00:28 +03:00
Eugene Kenny
d034f488f9 Use SHA-1 for non-sensitive digests by default
Instead of providing a configuration option to set the hash function,
switch to SHA-1 for new apps and allow upgrading apps to opt in later
via `new_framework_defaults_5_2.rb`.
2018-01-08 20:45:46 +00:00
Pat Allan
acea68de02 Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
David Heinemeier Hansson
75fa8dd309 Use recyclable cache keys (#29092) 2017-05-18 18:12:32 +02:00
Xavier Noria
783763bde9 applies new string literal convention in railties/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:16:09 +02:00
Kasper Timm Hansen
b4558c10fb Make collection caching explicit.
Having collection caching that wraps templates and automatically tries
to infer if they are cachable proved to be too much of a hassle.

We'd rather have it be something you explicitly turn on.

This removes much of the code and docs to explain the previous automatic
behavior.

This change also removes scoped cache keys and passing cache_options.
2016-02-20 16:54:32 +01:00
Aaron Patterson
3239ed48d2 move digest cache on to the DetailsKey object
This moves digest calculation cache on to the details key object.
Before, the digest cache was a class level ivar, and one of the keys was
the hash value of the details key object:

  13c4cc3b5a/actionview/lib/action_view/digestor.rb (L28)

An object's hash value is not unique, so it's possible for this cache
key to produce colliding keys with no resolution.  This commit move
cache on to the details key object itself, so we know that the digests
are always unique per details key object.
2016-02-18 08:23:26 -08:00
Kasper Timm Hansen
40f79da8f2 Make digest cache work in development.
Avoid computing the same fragment digest many times when looping over templates.

The cache is cleared on every request so template changes are still picked up.
2015-07-18 21:54:19 +02:00