Ask A Question


You’re not receiving notifications from this thread.

How can I add third party plugin in rails 6?

Siva Ganesh asked in Rails

My application.html.erb looks like this. I just want to remove all cloudfare(cdnjs) external link from application.html.erb. Instead of that I just want to use it in application.js . Because I dont want my application to get load third party plugin every time. If we used it in application.js it will compile for the first time. so my application dont get that much load.

Thanks please assist me

<!DOCTYPE html>
<html lang="en">
    <title><%= yield(:title).present? ? yield(:title) : 'Tryblank' %></title>
    <meta name="description" content="<%= yield(:description).present? ? yield(:description) : 'Tryblank' %>" />
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>
    <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
    <%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
    <script src=""></script>
    <link rel="stylesheet" type="text/css" href="" />
    <script src="" type="text/javascript"></script>
    <script src="" type="text/javascript"></script>
    <%# <p class="notice"> notice</p> <p class="alert">alert</p> %>
    <%= yield %>
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 83,038+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.