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

configurations.rb #14

Open geekelo opened 2 months ago

geekelo commented 2 months ago

FILE

ActiveAdmin.register ConfigurationSetting do

  actions :all, except: :destroy

  config.sort_order = 'name'

  menu parent: 'Configuration', label: 'General'

  # 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 :name, :slug, :configuration_type, :description, :resource, :active, :data
  #
  # or
  #
  # permit_params do
  #   permitted = [:name, :type, :description, :active, :data]
  #   permitted << :other if params[:action] == 'create' && current_user.admin?
  #   permitted
  # end

  index do
    selectable_column
    id_column
    column :slug
    column :name
    column :configuration_type
    column :description
    column :active
  end
end
geekelo commented 2 months ago

This file sets up the ActiveAdmin interface for managing ConfigurationSetting records, with a focus on allowing all actions except for deletion. The configuration includes menu placement, permitted parameters, and index page customization.

File: configuration_setting.rb

1. Actions Configuration

2. Sorting Configuration

3. Menu Configuration

4. Permitted Parameters

5. Index Page Customization

Summary: