From 51837621a55eb05a5bc7297dd5386dfa4c544f98 Mon Sep 17 00:00:00 2001 From: Mario See Date: Tue, 7 May 2019 16:50:50 -0400 Subject: [PATCH] Change ReplitTag to render using ActionController (#2745) [ci skip] --- app/liquid_tags/replit_tag.rb | 10 +++++++--- app/views/liquids/_replit.html.erb | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 app/views/liquids/_replit.html.erb diff --git a/app/liquid_tags/replit_tag.rb b/app/liquid_tags/replit_tag.rb index 1c9297393..ee4a7231d 100644 --- a/app/liquid_tags/replit_tag.rb +++ b/app/liquid_tags/replit_tag.rb @@ -1,13 +1,17 @@ class ReplitTag < LiquidTagBase + PARTIAL = "liquids/replit".freeze def initialize(tag_name, id, tokens) super @id = parse_id(id) end def render(_context) - '
- -
' + ActionController::Base.new.render_to_string( + partial: PARTIAL, + locals: { + id: @id + }, + ) end private diff --git a/app/views/liquids/_replit.html.erb b/app/views/liquids/_replit.html.erb new file mode 100644 index 000000000..de67318fa --- /dev/null +++ b/app/views/liquids/_replit.html.erb @@ -0,0 +1,3 @@ +
+ +