Commit Graph

28 Commits

Author SHA1 Message Date
Max Melentiev 238035409e Fixed usage of cache_template_loading
It disables recompilation of templates on every request in test env.
2016-12-06 23:36:47 +03:00
Guillermo Iguaran 0cafbd4e9e Convert ActionView::Railtie into Engine 2016-11-26 01:23:07 -05:00
Rafael Mendonça França fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
Matthew Draper e8b36e7711 Avoid bumping the class serial when invoking executor 2016-10-03 13:35:51 +10:30
Kasper Timm Hansen 23b6a9c0fc Replace middleware with executor callback.
Per request digest caches were added before we had hooks into
different units of work that Rails performs.

As such the most reliable way to prevent stale cache digests
was with a middleware. The middleware prevented staleness in
Action Controller requests.

However, the executor is superior because it should also prevent
staleness when running just Active Job jobs or broadcasting
through Action Cable's server.
2016-05-16 21:34:16 +02:00
Vipul A M 31458a94a6 Push action_view.collection_caching to be called towards the end, since it depends on being called after action_controller.set_configs.
This causes, other AV initializers after it to be called after all of AC initializers, which get pulled in before since action_controller.set_configs gets called.
Hence, push initializer depending on after hook, to be called after all initializers for this railtie are done.
2016-04-28 02:51:10 +05:30
Kasper Timm Hansen 940124a226 Respect gospel of Railties Gods: no on_load with after.
We don't need no stinking `on_load` where we're going! Because
people far wiser than me (@rafaelfranca and @jeremy) know that
passing `:after` means the lib is already loaded.
2016-04-27 22:24:28 +02:00
Lachlan Sylvester 4266a61285 make the collection_caching initializer run after the Action Controller configs are setup 2016-04-27 20:49:37 +10:00
Dharam Gollapudi 056d0fd53c Rename dependencies.rake to cache_digests.rake
As the tasks are related to cache_digests and
as they are already namespaced under cache_digests,
renaming to cache_digests.rake makes it to know
where to find these tasks.
2016-03-09 15:32:11 -08:00
Sameer Rahmani c1dbb13eac debug_missing_translation configuration added to action_view
`I18n.translate` helper will wrap the missing translation keys
in a <span> tag only if `debug_missing_translation` configuration has
a truthy value. Default value is `true`. For example in `application.rb`:

    # in order to turn off missing key wrapping
    config.action_view.debug_missing_translation = false
2015-12-18 22:45:05 +03:30
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
Jorge Bejar e3808878c6 Exclude cache_digests:dependencies rake task in api app 2015-06-11 16:54:14 -03:00
Kasper Timm Hansen e56c635427 Merge multi_fetch_fragments.
Makes caching a collection of template partials faster using `read_multi`
on the Rails cache store.

Some caching implementations have optimized `read_multi` so we don't have
to check in the cache store for every template.
2015-02-20 20:07:50 +01:00
robertomiranda ce8efcf296 Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846
ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
2015-01-31 23:12:41 -05:00
Rafael Mendonça França fe13e71162 Remove the explicit order set for the initializer
This will fix the regression added on
b068e20b35.

See tests added at ff08d31 to a better understanding about the problem
2013-12-05 16:37:10 -02:00
Łukasz Strzałkowski e064658d64 Include AV::Layouts directly in AM::Base
No need to do this in railtie as AM depends on AV either way
2013-12-05 01:03:03 +01:00
Łukasz Strzałkowski d8888b94b3 Retain ActionPack dependency on ActionView 2013-12-05 01:02:46 +01:00
Thomas von Deyen 1825f6fb60 Adds template dependencies rake task from cache_digests gem.
This adds the rake tasks `cache_digests:dependencies` and `cache_digests:nested_dependencies` from `cache_digests` gem.
2013-09-26 21:19:19 +02:00
Łukasz Strzałkowski 6c7d895dda Do not load AV inside AP
Move that part to AV railtie
2013-08-25 11:39:12 +02:00
Łukasz Strzałkowski 839938e3de Revert "Move setting content_type to AV"
This reverts commit f4d602aff6cec80304b131ecfcc2676d0304f0cc.
2013-08-25 11:39:12 +02:00
Łukasz Strzałkowski cb2d671cb8 Move setting content_type to AV 2013-08-25 11:39:11 +02:00
Łukasz Strzałkowski b068e20b35 Include AV::Layouts before setting view_paths 2013-08-25 11:39:11 +02:00
Łukasz Strzałkowski d1760253f5 Load AV::Layout to AM::Base in railties 2013-08-25 11:39:11 +02:00
Łukasz Strzałkowski 3fd2e72477 Load AV::Layouts dynamicly via railties 2013-08-25 11:39:10 +02:00
Łukasz Strzałkowski b9b48c7806 Remove abstract_controller load hooks 2013-08-25 11:39:09 +02:00
Łukasz Strzałkowski 766fa97b45 Hook up AV::Rendering on AV intialization 2013-08-25 11:39:08 +02:00
Łukasz Strzałkowski c48ce6e73d Move layouts to AV 2013-08-25 11:39:07 +02:00
Piotr Sarnacki 0d6e8edc2a Move actionpack/lib/action_view* into actionview/lib 2013-06-20 17:23:15 +02:00