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 d3e312b commit e6748ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
22 changes: 1 addition & 21 deletions app/views/base/_matome_wall.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,4 @@
= javascript_include_tag "wall"

#container.hidden
ul
- @matomes.each do |matome|
li.group_box.box
h2.title = link_to matome.title, matome
p.description
span.clip_count
= matome.clips.size
| クリップ
.image_box
- if matome.clips.size.nonzero?
- clip = matome.clips.shift
= link_to image_tag_for_tag(clip), matome
ul.sub_image_boxes
- clips = matome.clips.take(3)
- clips += [ nil ] * 3
- clips.take(3).each do |clip|
li
- if clip
= link_to image_tag_for_tag_small(clip), matome
- else
= link_to '', matome
== render partial: 'base/matomes', locals: { matomes: @matomes }
File renamed without changes.
4 changes: 2 additions & 2 deletions app/views/matomes/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@
- if @related_matomes[:clip].present?
.related
h2 関連まとめ
== render partial: 'related', locals: { matomes: @related_matomes[:clip] }
== render partial: 'base/matomes', locals: { matomes: @related_matomes[:clip] }

- if @related_matomes[:user].present?
.related
h2
span.name = link_to @matome.user.nick_name, user_path(@matome.user)
span.title さん
span.message のまとめ
== render partial: 'related', locals: { matomes: @related_matomes[:user] }
== render partial: 'base/matomes', locals: { matomes: @related_matomes[:user] }

0 comments on commit e6748ad

Please sign in to comment.