teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

スペルミスを直しました

2018/10/14 02:53

投稿

koutah
koutah

スコア10

title CHANGED
File without changes
body CHANGED
@@ -42,7 +42,7 @@
42
42
  <!-- お気に入りが存在するときの処理 -->
43
43
  <% if Favorite.exists?(user_id:current_user.id, book_id: @book.id) %>
44
44
  <% favorite= Favorite.find_by(book_id: @book.id) %>
45
- <%= button_to book_favorite_path(favorite, book_id: @book.id), method: :delete, class: "favorites-button", remote: true do %>
45
+ <%= button_to book_favorite_path(favorite, book_id: @book.id), method: :delete, class: "favorite-buttons", remote: true do %>
46
46
  <%= image_tag("star-on.png") %>
47
47
  <span>
48
48
  <%= @book.favorites_count %>
@@ -50,7 +50,7 @@
50
50
  <% end %>
51
51
  <!-- お気に入りが存在しないときの処理 -->
52
52
  <% else %>
53
- <%= button_to book_favorites_path(@book), class: "favorites-button", remote: true, cache: false do %>
53
+ <%= button_to book_favorites_path(@book), class: "favorite-buttons", remote: true, cache: false do %>
54
54
  <%= image_tag("star-off.png") %>
55
55
  <span>
56
56
  <%= @book.favorites_count %>