I'm trying to get javascript_include_tag("jquery") to work in a Liquid tag inside rails. My problem is that javascript_include_tag("jquery") returns <script src="/javascript/jquery.js"></script>. And not: <script src="/assets/jquery_ujs.js"></script>. Also in production the tag does not add the file fingerprint.
class JqueryTag < ::Liquid::Tag
# Include the stylesheet tag link helper
include ActionView::Helpers::AssetTagHelper
def render(context)
return javascript_include_tag("jquery")
end
end
Liquid::Template.register_tag('jquery_tag', JqueryTag)