Skip to content

Instantly share code, notes, and snippets.

@kevindayton
Created June 22, 2022 13:18
Show Gist options
  • Save kevindayton/21c8ec16825e3acc2c95fba732c4b96a to your computer and use it in GitHub Desktop.
Save kevindayton/21c8ec16825e3acc2c95fba732c4b96a to your computer and use it in GitHub Desktop.
REST User Page (ActiveAdmin)
# 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