Created
June 22, 2022 13:18
-
-
Save kevindayton/21c8ec16825e3acc2c95fba732c4b96a to your computer and use it in GitHub Desktop.
REST User Page (ActiveAdmin)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
CalendlyAdmin.register RestUser do | |
menu priority: 99 | |
actions :index | |
controller do | |
def permitted_params | |
params.permit! | |
end | |
end | |
form do |f| | |
f.semantic_errors | |
end | |
index do | |
column(:id) | |
column(:title) | |
column(:first_name) | |
column(:last_name) | |
column(:picture) | |
actions defaults: false do |user| | |
label user.posts.count | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment