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_policies.rb #24

Open geekelo opened 1 month ago

geekelo commented 1 month ago

FILE

ActiveAdmin.register InsurancePolicy do

  config.sort_order = 'created_at_asc'

  menu parent: 'Loans & Insurance', label: 'Calculator Data'

  # 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 :policy_year, :age, :planned_premium, :annual_income, :accumulated_value, :surrender_value, 
                :net_death_benefit, :gender, :planned_premium_per_year, :contribution_total, :tax_free_distribution_total, :age_range
  #
  # or
  #
  # permit_params do
  #   permitted = [:policy_year, :age, :planned_premium, :annual_income, :accumulated_value, :surrender_value, :net_death_benefit, :gender, :planned_premium_per_year, :contribution_total, :tax_free_distribution_total, :age_range]
  #   permitted << :other if params[:action] == 'create' && current_user.admin?
  #   permitted
  # end

end
geekelo commented 1 month ago

This ActiveAdmin configuration sets up an admin interface for managing InsurancePolicy 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 allows administrators to manage InsurancePolicy records in a controlled and organized manner. The resource is categorized under "Loans & Insurance" and labeled as "Calculator Data," indicating its use in insurance-related calculations. The default sort order and permitted parameters are configured to ensure that data can be safely and efficiently managed within the admin interface. The flexibility provided by the commented-out block allows for more granular control if needed.