diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-11-19 23:56:25 +0300 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2016-11-21 15:43:37 +0300 |
commit | e74e53ae98bd7656eb84e907e25f2ad0b70afde9 (patch) | |
tree | fa0ad75c7166360899257d82af0c24c5bd574d34 /app | |
parent | 8e5ad7c01a3617f57d4750d0be8d8d7405e70137 (diff) |
Pass @service using subject
Diffstat (limited to 'app')
4 files changed, 4 insertions, 4 deletions
diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index f313c2d9032..e5b8ebdf613 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -4,7 +4,7 @@ %p #{@service.description} template = form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'form-horizontal fieldset-form' } do |form| - = render 'shared/service_settings', form: form + = render 'shared/service_settings', form: form, subject: @service .footer-block.row-content-block .form-actions diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index 8ada4c4b962..db51c4f8a4e 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -7,7 +7,7 @@ %p= @service.description .col-lg-9 = form_for(@service, as: :service, url: namespace_project_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |form| - = render 'shared/service_settings', form: form + = render 'shared/service_settings', form: form, subject: @service .footer-block.row-content-block = form.submit 'Save changes', class: 'btn btn-save' diff --git a/app/views/projects/services/mattermost_command/_help.html.haml b/app/views/projects/services/mattermost_command/_help.html.haml index b3386103e7c..c6e0e883752 100644 --- a/app/views/projects/services/mattermost_command/_help.html.haml +++ b/app/views/projects/services/mattermost_command/_help.html.haml @@ -51,7 +51,7 @@ .form-group = label_tag :request_url, 'Request URL', class: 'col-sm-2 col-xs-12 control-label' .col-sm-10.col-xs-12.input-group - = text_field_tag :request_url, service_trigger_url(@service), class: 'form-control input-sm', readonly: 'readonly' + = text_field_tag :request_url, service_trigger_url(subject), class: 'form-control input-sm', readonly: 'readonly' .input-group-btn = clipboard_button(clipboard_target: '#request_url') diff --git a/app/views/shared/_service_settings.html.haml b/app/views/shared/_service_settings.html.haml index 85c54a0fcd4..755d6acc777 100644 --- a/app/views/shared/_service_settings.html.haml +++ b/app/views/shared/_service_settings.html.haml @@ -1,7 +1,7 @@ = form_errors(@service) - if lookup_context.template_exists?('help', "projects/services/#{@service.to_param}", true) - = render "projects/services/#{@service.to_param}/help", subject: @service + = render "projects/services/#{@service.to_param}/help", subject: subject - elsif @service.help.present? .well = preserve do |