質問編集履歴
1
表示画面のコードを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -101,3 +101,37 @@
|
|
101
101
|
検証コンソールのエラー表示
|
102
102
|
|
103
103
|
![![検証コンソールのエラー表示](3f978fc56e7885085c527208eff67222.png)
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
app/views/reviews/index.html.erb
|
108
|
+
|
109
|
+
```
|
110
|
+
|
111
|
+
<div class="review-star">
|
112
|
+
|
113
|
+
<div id="star-rate-<%= review.id %>"></div>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<script>
|
118
|
+
|
119
|
+
$('#star-rate-<%= review.id %>').raty({
|
120
|
+
|
121
|
+
size: 5,
|
122
|
+
|
123
|
+
starOff: '<%= asset_path('star-off.png') %>',
|
124
|
+
|
125
|
+
starOn : '<%= asset_path('star-on.png') %>',
|
126
|
+
|
127
|
+
half: true,
|
128
|
+
|
129
|
+
readOnly: true,
|
130
|
+
|
131
|
+
score: <%= review.rate %>,
|
132
|
+
|
133
|
+
});
|
134
|
+
|
135
|
+
</script>
|
136
|
+
|
137
|
+
```
|