I am having an issue with the data table (a table that includes search, sort, and pagination) that I implemented on my website using a Ruby on Rails 5.0 framework. I added this jQuery code (code below): in one of my .js files, which I followed all of the steps from rails cast (episode 340). The implementation works after I refresh my webpage. Need help--I am trying to figure out why I need to keep refreshing in order for my table to show all features of data table?
jQuery ->
$('#reviews').dataTable()