f706a973c2
- 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`
9 lines
377 B
Text
9 lines
377 B
Text
- scopes = local_assigns.fetch(:scopes)
|
|
- prefix = local_assigns.fetch(:prefix)
|
|
- token = local_assigns.fetch(:token)
|
|
|
|
- scopes.each do |scope|
|
|
%fieldset
|
|
= check_box_tag "#{prefix}[scopes][]", scope, token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}"
|
|
= label_tag "#{prefix}_scopes_#{scope}", scope
|
|
%span= "(#{t(scope, scope: [:doorkeeper, :scopes])})"
|