BananaCrystal / email-templates

This repository contains in-house email templates that serve as structure for our emails. Each template can be updated and modified to fit requirements.
MIT License
0 stars 0 forks source link

invites.rb #25

Open geekelo opened 1 month ago

geekelo commented 1 month ago

FILE

ActiveAdmin.register Invite do

  actions :all, except: [:new, :edit, :destroy]

  config.sort_order = 'created_at_asc'

  menu parent: 'Users', label: 'User Invites'

  # See permitted parameters documentation:
  # https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
  #
  # Uncomment all parameters which should be permitted for assignment
  #
  # permit_params :user_id, :email, :name, :message, :include_referral_link, :invited_at, :status, :discarded_at
  #
  # or
  #
  # permit_params do
  #   permitted = [:user_id, :email, :name, :message, :include_referral_link, :invited_at, :status, :discarded_at]
  #   permitted << :other if params[:action] == 'create' && current_user.admin?
  #   permitted
  # end

end
geekelo commented 1 month ago

This ActiveAdmin configuration is set up to manage Invite records within the admin interface. Here’s a detailed breakdown of its components:

1. Actions Configuration

2. Sort Order Configuration

3. Menu Configuration

4. Permitted Parameters

5. Commented Alternative Configuration

Summary

This ActiveAdmin configuration for Invite records is designed to provide a streamlined and controlled way to manage user invitations within the admin interface. By excluding the new, edit, and destroy actions, it focuses on viewing and monitoring invites rather than creating or modifying them directly. The resource is organized under the "Users" menu, emphasizing its relevance to user management. The permitted parameters block is commented out, suggesting that if needed, administrators could enable and customize the parameters that can be modified.