summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2016-06-30 16:40:32 +0300
committerValery Sizov <valery@gitlab.com>2016-06-30 16:40:32 +0300
commitac8b9272738352912b8ca01d1cf792196e216a9d (patch)
tree73162bebd2e7216c26306c2b8ff0782980b6af12
parent13fc95acc4b8ca418de2af383a6f0e1ccee9e9a2 (diff)
downloadgitlab-ce-code_style_fixes_.tar.gz
Code Style: simplify render blockscode_style_fixes_
-rw-r--r--app/views/admin/builds/index.html.haml3
-rw-r--r--app/views/dashboard/milestones/index.html.haml3
-rw-r--r--app/views/explore/groups/index.html.haml5
-rw-r--r--app/views/groups/milestones/index.html.haml3
-rw-r--r--app/views/projects/branches/index.html.haml3
-rw-r--r--app/views/projects/container_registry/index.html.haml3
6 files changed, 7 insertions, 13 deletions
diff --git a/app/views/admin/builds/index.html.haml b/app/views/admin/builds/index.html.haml
index 1e60205f91a..f0e7d87390b 100644
--- a/app/views/admin/builds/index.html.haml
+++ b/app/views/admin/builds/index.html.haml
@@ -48,7 +48,6 @@
%th Finished at
%th
- - @builds.each do |build|
- = render "admin/builds/build", build: build
+ = render partial: "admin/builds/build", collection: @builds
= paginate @builds, theme: 'gitlab'
diff --git a/app/views/dashboard/milestones/index.html.haml b/app/views/dashboard/milestones/index.html.haml
index 917bfbd47e9..7db6742af51 100644
--- a/app/views/dashboard/milestones/index.html.haml
+++ b/app/views/dashboard/milestones/index.html.haml
@@ -13,6 +13,5 @@
%li
.nothing-here-block No milestones to show
- else
- - @milestones.each do |milestone|
- = render 'milestone', milestone: milestone
+ = render partial: 'milestone', collection: @milestones
= paginate @milestones, theme: "gitlab"
diff --git a/app/views/explore/groups/index.html.haml b/app/views/explore/groups/index.html.haml
index 57f6e7e0612..368ccde9c95 100644
--- a/app/views/explore/groups/index.html.haml
+++ b/app/views/explore/groups/index.html.haml
@@ -36,9 +36,8 @@
= sort_title_oldest_updated
%ul.content-list
- - @groups.each do |group|
- = render 'shared/groups/group', group: group
- - unless @groups.present?
+ = render partial: 'shared/groups/group', collection: @groups
+ - if @groups.empty?
.nothing-here-block No public groups
diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml
index 121a7de3ad7..b745f5a8a98 100644
--- a/app/views/groups/milestones/index.html.haml
+++ b/app/views/groups/milestones/index.html.haml
@@ -20,6 +20,5 @@
%li
.nothing-here-block No milestones to show
- else
- - @milestones.each do |milestone|
- = render 'milestone', milestone: milestone
+ = render partial: 'milestone', collection: @milestones
= paginate @milestones, theme: "gitlab"
diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml
index 77b405f1f39..5085b52cf57 100644
--- a/app/views/projects/branches/index.html.haml
+++ b/app/views/projects/branches/index.html.haml
@@ -29,6 +29,5 @@
= sort_title_oldest_updated
- if @branches.any?
%ul.content-list.all-branches
- - @branches.each do |branch|
- = render "projects/branches/branch", branch: branch
+ = render partial: "projects/branches/branch", collection: @branches
= paginate @branches, theme: 'gitlab'
diff --git a/app/views/projects/container_registry/index.html.haml b/app/views/projects/container_registry/index.html.haml
index 993da27310f..577fb6deb99 100644
--- a/app/views/projects/container_registry/index.html.haml
+++ b/app/views/projects/container_registry/index.html.haml
@@ -35,5 +35,4 @@
- if can?(current_user, :update_container_image, @project)
%th
- - @tags.each do |tag|
- = render 'tag', tag: tag
+ = render partial: 'tag', collection: @tags