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

insurance_leads.rb #23

Open geekelo opened 3 months ago

geekelo commented 3 months ago

FILE

ActiveAdmin.register InsuranceLead do
  config.sort_order = 'created_at_desc'

  menu parent: 'Loans & Insurance', label: 'Insurance Leads'
  # 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 :email, :date_of_birth, :premium, :first_name, :last_name, :gender, :phone_number, :country
  #
  # or
  #
  # permit_params do
  #   permitted = [:email, :date_of_birth, :premium, :first_name, :last_name, :gender, :phone_number, :country]
  #   permitted << :other if params[:action] == 'create' && current_user.admin?
  #   permitted
  # end

end
geekelo commented 3 months ago

This ActiveAdmin configuration sets up an admin interface for managing InsuranceLead records. Here’s a breakdown of the key components:

1. Menu Configuration

2. Sort Order Configuration

3. Permitted Parameters

4. Commented Configuration

Summary

This configuration is designed to manage InsuranceLead records efficiently. It places the resource within a relevant menu, ensures new leads are easily accessible, and securely defines which attributes can be modified by administrators. The flexibility provided by the commented-out block allows for advanced configurations if necessary, such as conditional parameter permissions.