Siva Ganesh


50 Experience
0 Lessons Completed
0 Questions Solved


Posted in How can I add third party plugin in rails 6?

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="[email protected]"></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 %>
logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.