diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-02-28 11:49:32 -0600 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-03-06 09:47:44 -0600 |
commit | 43958926c5310642f2fc0c6f72952004d2ca5089 (patch) | |
tree | e22837cc90314fc245058a9c764796d48dd1df11 /app/views | |
parent | a29517dd0c6515121a2f42e08ad011415a3d8618 (diff) | |
download | gitlab-ce-43958926c5310642f2fc0c6f72952004d2ca5089.tar.gz |
Added delegations to comply with the new rubocop rules
Also fixed the deploy_keys view and moved the code from the repository_helper
to the repository_controller
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/deploy_keys/_index.html.haml | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/views/projects/deploy_keys/_index.html.haml b/app/views/projects/deploy_keys/_index.html.haml index 9f351d3b90e..0cbe9b3275a 100644 --- a/app/views/projects/deploy_keys/_index.html.haml +++ b/app/views/projects/deploy_keys/_index.html.haml @@ -15,8 +15,7 @@ Enabled deploy keys for this project (#{@deploy_keys.enabled_keys_size}) - if @deploy_keys.any_keys_enabled? %ul.well-list - - @deploy_keys.enabled_keys.each do |enabled_key| - = render partial: 'projects/deploy_keys/deploy_key', locals: {deploy_key: enabled_key} + = render partial: 'projects/deploy_keys/deploy_key', collection: @deploy_keys.enabled_keys, as: :deploy_key - else .settings-message.text-center No deploy keys found. Create one with the form above. @@ -24,8 +23,7 @@ Deploy keys from projects you have access to (#{@deploy_keys.available_project_keys_size}) - if @deploy_keys.any_available_project_keys_enabled? %ul.well-list - - @deploy_keys.available_project_keys.each do |available_key| - = render partial: 'projects/deploy_keys/deploy_key', locals: {deploy_key: available_key} + = render partial: 'projects/deploy_keys/deploy_key', collection: @deploy_keys.available_project_keys, as: :deploy_key - else .settings-message.text-center No deploy keys from your projects could be found. Create one with the form above or add existing one below. @@ -33,5 +31,4 @@ %h5.prepend-top-default Public deploy keys available to any project (#{@deploy_keys.available_public_keys_size}) %ul.well-list - - @deploy_keys.available_public_keys.each do |available_key| - = render partial: 'projects/deploy_keys/deploy_key', locals: {deploy_key: available_key} + = render partial: 'projects/deploy_keys/deploy_key', collection: @deploy_keys.available_public_keys, as: :deploy_key |