首页 > 解决方案 > 使用 jquery 在 Ruby on Rails 6 上显示星级时出现问题。星星不出现

问题描述

这是我使用的表格,允许选择明星进行审核。

   <%= simple_form_for([@restaurant, @restaurant.reviews.build]) do |f|%>
    <div id="rating-form">
     <%= f.input :rating %>
    </div>

this is the javascript / j query code for the stars
    <script>
        $('#rating-form').raty({
            path: '/assets/',
            scoreName: 'review[rating]'
        });
    </script>

我试过改变目录,我有所有需要的依赖项,宝石。但仍然不能让他们工作。请问有什么帮助吗?

标签: ruby-on-rails-6

解决方案


推荐阅读