ruby-on-rails-6 - 使用 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>
我试过改变目录,我有所有需要的依赖项,宝石。但仍然不能让他们工作。请问有什么帮助吗?
解决方案
推荐阅读
- python - 如何为列表中的每个元素添加转换因子?
- npm - npm 安装后 npm 安装
? - django - 如何正确地将参数传递给 Django 中的基于类的视图实例?
- java - 如何将 void 方法中的值转换为 toString 方法?
- android - android 5 lolipop 中的日期选择器对话框问题
- go - Golang 应用程序的类似 PM2 的流程管理解决方案?
- javascript - 几分钟后反应原生 vscode 扩展不起作用
- c++ - 当两个字符串不同时,为什么 wcscmp() 返回 True?
- javascript - 如何使用 lodash 用另一个对象数组更新一个对象数组?
- html - 使用 css/html 从底部排列角度组件