I wanted Masonry for my Rails 4.2 project and initially installed it via the masonry-rails gem and then wasted an evening until I realized that the gem was using an outdated version of Masonry. This will be my first attempt to add javascript to my Rails app without a gem. From the installation docs the options are: Download, CDN, Package managers (bower/npm)
I used CDN by simply adding
<script src="https://npmcdn.com/masonry-layout@4.1/dist/masonry.pkgd.min.js"></script>
to the top of my index.html.erb view file that will use the script. Is this correct?
What is the advantage/disadvantage of using CDN instead of Download or Package managers and if I want to add masonry.pkgd.min.js
manually to my project how would i do so?