Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
まとめ: 同じまとめを複数回表示するとクリップ数が不正になる不具合を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
YOSHIDA Hiroki committed Jan 3, 2014
1 parent e6748ad commit 54b5e57
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/views/base/_matomes.html.slim
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
ul
- matomes.each do |matome|
- clips = matome.clips.all
li.group_box.box
h3.title = link_to matome.title, matome
p.description
span.clip_count
= matome.clips.size
= clips.size
| クリップ
.image_box
- if matome.clips.size.nonzero?
- clip = matome.clips.shift
= link_to image_tag_for_tag(clip), matome
- if clips.size.nonzero?
- main_clip = clips.shift
= link_to image_tag_for_tag(main_clip), matome
ul.sub_image_boxes
- clips = matome.clips.take(3)
- clips += [ nil ] * 3
- clips.take(3).each do |clip|
- sub_clips = (clips + Array.new(3)).take(3)
- sub_clips.each do |clip|
li
- if clip
= link_to image_tag_for_tag_small(clip), matome
Expand Down

0 comments on commit 54b5e57

Please sign in to comment.