1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

14 commits

Author SHA1 Message Date
Aaron Patterson
1581cab9ff
Pass the template format to the digestor
This commit passes the template format to the digestor in order to come
up with a key.  Before this commit, the digestor would depend on the
side effect of the template renderer setting the rendered_format on the
lookup context.  I would like to remove that mutation, so I've changed
this to pass the template format in to the digestor.

I've introduced a new instance variable that will be alive during a
template render.  When the template is being rendered, it pushes the
current template on to a stack, setting `@current_template` to the
template currently being rendered.  When the cache helper asks the
digestor for a key, it uses the format of the template currently on the
stack.
2019-02-15 17:27:33 -08:00
Aaron Patterson
4f96e739c2
Remove deprecated catch-all route in the AV tests
This commit removes a deprecated catch-all route in the AV tests.  It
defines and includes the necessary routes for each test such that we
don't need the catch-all anymore.

This also helps push us toward #33970
2018-09-24 15:39:15 -07:00
schneems
1bd578ffe6 Don’t allocate array on no args
When no dependencies are present to be digested there is no reason to build an array just to turn around and turn it back into a string.

The dependencies array is not mutated in this method so we can use the same empty array across all invocations.

Total allocated: 791402 bytes (7294 objects)
Total allocated: 777442 bytes (7132 objects)

(791402 - 777442) / 791402.0 # => 1.76 % speed improvement
2018-09-07 17:33:10 -05:00
Kir Shatrov
424117281e Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Kasper Timm Hansen
8240636bed Merge pull request https://github.com/rails/rails/pull/28637 from st0012/fix-partial-cache-logging 2017-06-08 21:42:46 +02:00
Stan Lo
2abf6ca0c8 Use a hash to record every partial's cache hit status instead of sharing a boolean. 2017-06-08 21:42:46 +02:00
David Heinemeier Hansson
75fa8dd309 Use recyclable cache keys (#29092) 2017-05-18 18:12:32 +02:00
Rafael Mendonça França
fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
Rafael Mendonça França
55f9b8129a
Add three new rubocop rules
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces

Fix all violations in the repository.
2016-08-16 04:30:11 -03:00
Xavier Noria
b326e82dc0 applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
Xavier Noria
4b6c68dfb8 applies new string literal convention in actionview/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:50:17 +02:00
Lachlan Sylvester
a9c6a583b6 Fix calling cache helper with a relation 2015-08-28 17:26:09 +10:00