Skip to content

Commit

Permalink
Refactor User::ROLES to User.roles
Browse files Browse the repository at this point in the history
  • Loading branch information
veganstraightedge committed Sep 10, 2024
1 parent 9fcbcab commit 967dbfb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/views/admin/users/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
<li><b>Publishers</b> can write drafts, make edits to published articles, and publish articles.</li>
</ul>

<% User::ROLES.each do |role| %>
<% User.roles.each do |role, _| %>
<div class="form-check form-check-inline">
<span class="d-inline-block me-3">
<%= form.radio_button :role, role, id: "user_role_#{role}", class: "form-check-input" %>
<%= form.label :role, role.capitalize, class: "form-check-label", for: "user_role_#{role}" %>
<%= form.radio_button :role, role, class: "form-check-input" %>
<%= form.label :role, role.capitalize, class: "form-check-label", value: role %>
</span>
</div>
<% end %>
Expand Down

0 comments on commit 967dbfb

Please sign in to comment.