回答編集履歴
1
色は指定の範囲からでしたね
test
CHANGED
@@ -4,11 +4,13 @@
|
|
4
4
|
|
5
5
|
```ruby
|
6
6
|
|
7
|
+
<% colors = %w|red green yellow #fcc| %>
|
8
|
+
|
7
9
|
<% @notes.each do |note| %>
|
8
10
|
|
9
11
|
<%= content_tag :div, class: :note,
|
10
12
|
|
11
|
-
style:
|
13
|
+
style: "background-color: #{colors.sample}" do %>
|
12
14
|
|
13
15
|
<%= note.content %>
|
14
16
|
|