multi_fetch_fragments 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/multi_fetch_fragments.rb +3 -2
- metadata +1 -1
@@ -7,6 +7,7 @@ module MultiFetchFragments
|
|
7
7
|
|
8
8
|
private
|
9
9
|
def render_collection_with_multi_fetch_cache
|
10
|
+
|
10
11
|
return nil if @collection.blank?
|
11
12
|
|
12
13
|
if @options.key?(:spacer_template)
|
@@ -15,7 +16,7 @@ module MultiFetchFragments
|
|
15
16
|
|
16
17
|
result = []
|
17
18
|
|
18
|
-
if
|
19
|
+
if ActionController::Base.perform_caching && @options[:cache].present?
|
19
20
|
keys_to_collection_map = {}
|
20
21
|
|
21
22
|
@collection.each do |item|
|
@@ -62,7 +63,7 @@ module MultiFetchFragments
|
|
62
63
|
end
|
63
64
|
|
64
65
|
class Railtie < Rails::Railtie
|
65
|
-
initializer "
|
66
|
+
initializer "multi_fetch_fragments.initialize" do |app|
|
66
67
|
ActionView::PartialRenderer.class_eval do
|
67
68
|
include MultiFetchFragments
|
68
69
|
end
|