summaryrefslogtreecommitdiff
path: root/app/views/doorkeeper
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-12-05 09:49:51 +0530
committerTimothy Andrew <mail@timothyandrew.net>2016-12-16 16:29:32 +0530
commitf706a973c26f9de9a1f1599d532b33e9e66a80bb (patch)
treeec89ae65e503bf24b9e32b01715c0b7efd0111d6 /app/views/doorkeeper
parentf14d423dc7c9ec2d97c83f0c8893661922df4360 (diff)
downloadgitlab-ce-f706a973c26f9de9a1f1599d532b33e9e66a80bb.tar.gz
View-related (and other minor) changes to !5951 based on @rymai's review.
- The `scopes_form` partial can be used in the `admin/applications` view as well - Don't allow partials to access instance variables directly. Instead, pass in the instance variables as local variables, and use `local_assigns.fetch` to assert that the variables are passed in as expected. - Change a few instances of `render :partial` to `render` - Remove an instance of `required: false` in a view, since this is the default - Inline many instances of a local variable (`ip = 'ip'`) in `auth_spec`
Diffstat (limited to 'app/views/doorkeeper')
-rw-r--r--app/views/doorkeeper/applications/_form.html.haml2
-rw-r--r--app/views/doorkeeper/applications/show.html.haml2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/doorkeeper/applications/_form.html.haml b/app/views/doorkeeper/applications/_form.html.haml
index a6ad0bb8d1b..b3313c7c985 100644
--- a/app/views/doorkeeper/applications/_form.html.haml
+++ b/app/views/doorkeeper/applications/_form.html.haml
@@ -19,7 +19,7 @@
.form-group
= f.label :scopes, class: 'label-light'
- = render partial: 'shared/tokens/scopes_form', locals: { prefix: 'doorkeeper_application', token: application }
+ = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: application, scopes: @scopes
.prepend-top-default
= f.submit 'Save application', class: "btn btn-create"
diff --git a/app/views/doorkeeper/applications/show.html.haml b/app/views/doorkeeper/applications/show.html.haml
index e528cb825f5..559de63d96d 100644
--- a/app/views/doorkeeper/applications/show.html.haml
+++ b/app/views/doorkeeper/applications/show.html.haml
@@ -23,7 +23,7 @@
%div
%span.monospace= uri
- = render partial: "shared/tokens/scopes_list"
+ = render "shared/tokens/scopes_list", token: @application
.form-actions
= link_to 'Edit', edit_oauth_application_path(@application), class: 'btn btn-primary wide pull-left'