From e5e70e4ae0d1132e28fa72577a80a0a458ffecd0 Mon Sep 17 00:00:00 2001 From: Tomoya Mikami Date: Fri, 15 Dec 2017 16:41:12 +0900 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E5=91=A8=E3=82=8A=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/_closets.scss | 4 ++-- app/controllers/closets_controller.rb | 2 +- app/views/closets/edit.html.erb | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/_closets.scss b/app/assets/stylesheets/_closets.scss index be64d0c..805169b 100644 --- a/app/assets/stylesheets/_closets.scss +++ b/app/assets/stylesheets/_closets.scss @@ -48,7 +48,7 @@ } } #ClosetsItemGroupsIcons{ - width: 564px; + width: 940px; height: 64px; margin: auto; position: absolute; @@ -57,7 +57,7 @@ right: 0; left: 0; @media (max-width: 767px) { - width: 408px; + width: 680px; height: 48px; } } diff --git a/app/controllers/closets_controller.rb b/app/controllers/closets_controller.rb index 11fcced..c6d723a 100644 --- a/app/controllers/closets_controller.rb +++ b/app/controllers/closets_controller.rb @@ -156,7 +156,7 @@ def buy if ! UserHasClothe::user_has_clothe?(user.id, cloth.id) user.update_attribute(:coin, user.coin - cloth.price) #支払い UserHasClothe.create(user_id: user.id, clothes_id: cloth.id) #ユーザの持ってる服追加 - flash[:danger] = "服が購入できました" + flash[:success] = "服が購入できました" puts "服の新規購入" else flash[:danger] = "もう服を持っています" diff --git a/app/views/closets/edit.html.erb b/app/views/closets/edit.html.erb index 382245a..4bfd8ff 100644 --- a/app/views/closets/edit.html.erb +++ b/app/views/closets/edit.html.erb @@ -9,10 +9,11 @@
<%# 持ってるかどうか判定 %> <% if @user_has_clothes[obj.id] == true %> -
<% if Rails.env == 'production' then %> +
<% else %> +
<% end %>