Unify use of can_current_user_push_code Presenter

This commit is contained in:
Oswaldo Ferreira 2018-02-22 13:57:58 -03:00
parent 3956bb552f
commit 44d33db12a
2 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,3 @@
- if koding_enabled? && current_user && @repository.koding_yml && @project.user_can_push_to_branch?(current_user, @project.default_branch)
- if koding_enabled? && current_user && @repository.koding_yml && @project.can_current_user_push_code?
= link_to koding_project_url(@project), class: 'btn project-action-button inline', target: '_blank', rel: 'noopener noreferrer' do
_('Run in IDE (Koding)')

View File

@ -11,7 +11,7 @@
%h4
= _('The repository for this project is empty')
- if can?(current_user, :push_code, @project)
- if @project.can_current_user_push_code?
%p
- link_to_cli = link_to _('command line instructions'), '#repo-command-line-instructions'
= _('If you already have files you can push them using the %{link_to_cli} below.').html_safe % { link_to_cli: link_to_cli }