diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-12-05 09:49:51 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-12-16 16:29:32 +0530 |
commit | f706a973c26f9de9a1f1599d532b33e9e66a80bb (patch) | |
tree | ec89ae65e503bf24b9e32b01715c0b7efd0111d6 /app/views/doorkeeper | |
parent | f14d423dc7c9ec2d97c83f0c8893661922df4360 (diff) | |
download | gitlab-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.haml | 2 | ||||
-rw-r--r-- | app/views/doorkeeper/applications/show.html.haml | 2 |
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' |