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

admin_roles.rb #2

Open geekelo opened 2 months ago

geekelo commented 2 months ago

FILE

ActiveAdmin.register AdminRole do
  permit_params :name

  menu parent: 'Configuration', label: 'Admin Roles'

  # 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
  #
  #
  # or
  #
  # permit_params do
  #   permitted = [:name]
  #   permitted << :other if params[:action] == 'create' && current_user.admin?
  #   permitted
  # end
end
geekelo commented 2 months ago

This code is a configuration file for the ActiveAdmin framework in a Ruby on Rails application. ActiveAdmin is a popular tool for creating elegant and highly customizable admin interfaces in Rails applications. Let's break down what's happening in this specific file:

File: admin_role.rb

1. ActiveAdmin.register AdminRole do

2. permit_params :name

3. menu parent: 'Configuration', label: 'Admin Roles'

4. Commented Code

Summary:

This is a basic setup, and more customization can be added as needed by uncommenting and expanding the code.