Skip to content

Commit

Permalink
表示周りの修正
Browse files Browse the repository at this point in the history
  • Loading branch information
tomoya-mikami committed Dec 15, 2017
1 parent d758372 commit e5e70e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/assets/stylesheets/_closets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}
}
#ClosetsItemGroupsIcons{
width: 564px;
width: 940px;
height: 64px;
margin: auto;
position: absolute;
Expand All @@ -57,7 +57,7 @@
right: 0;
left: 0;
@media (max-width: 767px) {
width: 408px;
width: 680px;
height: 48px;
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/closets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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] = "もう服を持っています"
Expand Down
3 changes: 2 additions & 1 deletion app/views/closets/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
<div class="col-md-6 col-sm-12">
<%# 持ってるかどうか判定 %>
<% if @user_has_clothes[obj.id] == true %>
<div class="ItemBox" onclick="draw_image('<%= key %>', '<%= obj.image %>', <%= obj.priority %>, <%= obj.id %>);">
<% if Rails.env == 'production' then %>
<div class="ItemBox" onclick="draw_image('<%= key %>', 'https://<%= obj.image %>', <%= obj.priority %>, <%= obj.id %>);">
<div class="ItemImg" style='background-image: url("https://<%= obj.image %>")'></div>
<% else %>
<div class="ItemBox" onclick="draw_image('<%= key %>', '<%= obj.image %>', <%= obj.priority %>, <%= obj.id %>);">
<div class="ItemImg" style='background-image: url("<%= obj.image %>")'></div>
<% end %>
</div>
Expand Down

0 comments on commit e5e70e4

Please sign in to comment.