Pass @service using subject

This commit is contained in:
Luke "Jared" Bennett 2016-11-19 20:56:25 +00:00 committed by Z.J. van de Weg
parent 8e5ad7c01a
commit e74e53ae98
4 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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'

View file

@ -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')

View file

@ -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