Skip to content Skip to sidebar Skip to footer

Use 'noty' Js Library In Rails 5

I am trying to make noty.js ( https://ned.im/noty/#/installation - a library for notifications) work into my Rails app. I have installed it with npm npm install noty Now, it ap

Solution 1:

If you're not using webpack or some other JS asset management system, installing with NPM won't work. You'll need to

  1. Download noty.css and noty.js, place them in their respective assets directory
  2. Add them to your assets.rb
  3. Restart your server
  4. Reference the file in your layout prior to your application.js

Read the guides on the Asset Pipeline for more details.

<%= stylesheet_link_tag "noty" %>
<%= javascript_include_tag "noty" %>

Post a Comment for "Use 'noty' Js Library In Rails 5"