Skip to content

Commit

Permalink
Replace deprecated fragment_cache_key for Rails 5.2 support, Fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
malomalo committed Mar 15, 2019
1 parent 76dbdf3 commit 3e04532
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/turbostreamer/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ def _cache_key(key, options)
name_options = options.slice(:skip_digest, :virtual_path)
key = _fragment_name_with_digest(key, name_options)

if @context.respond_to?(:fragment_cache_key)
key = @context.fragment_cache_key(key)
if @context.respond_to?(:combined_fragment_cache_key)
key = @context.combined_fragment_cache_key(key)
elsif ::Hash === key
key = url_for(key).split('://', 2).last
end
Expand Down
2 changes: 1 addition & 1 deletion lib/turbostreamer/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class TurboStreamer
VERSION = '1.3.0'
VERSION = '1.4.0'
end

0 comments on commit 3e04532

Please sign in to comment.