lib/materialist/materializer/internals/dsl.rb in materialist-3.1.0 vs lib/materialist/materializer/internals/dsl.rb in materialist-3.2.0
- old
+ new
@@ -12,11 +12,11 @@
def capture_link_href(key, as:)
__materialist_dsl_mapping_stack.last << LinkHrefMapping.new(key: key, as: as)
end
- def link(key)
- link_mapping = LinkMapping.new(key: key)
+ def link(key, enable_caching: false)
+ link_mapping = LinkMapping.new(key: key, enable_caching: enable_caching)
__materialist_dsl_mapping_stack.last << link_mapping
__materialist_dsl_mapping_stack << link_mapping.mapping
yield
__materialist_dsl_mapping_stack.pop
end