I want to allow users to select scopes from a checkbox list. I've setup the form like so:
<%= f.label :scopes, class: 'col-sm-2 control-label' %>
<% Doorkeeper.configuration.scopes.each do |scope| %>
<%= check_box_tag("doorkeeper_application[scopes][#{scope}]", scope, @application.scopes.include?(scope)) %>
<%= scope %><br>
<% end %>
<% end %>
which produces
doorkeeper_application[scopes]
is accepted by Oauth::ApplicationsController
. While users should be able to select multiple scopes, parameters like doorkeeper_application[scopes][foo]
are not accepted.
What's the best practice for passing these params to the controller? Or is there a better practice to achieve checkboxed scopes in Doorkeeper?