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

currencies.rb #17

Open geekelo opened 1 month ago

geekelo commented 1 month ago

FILE

ActiveAdmin.register Currency do
  actions :all, except: :destroy
  permit_params :active

  config.sort_order = 'entity_asc'

  scope('Active', default: true) { |scope| scope.where(active: true) }
  scope('Inactive') { |scope| scope.where(active: false) }

  menu parent: 'Configuration', label: 'Currencies'

  # 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 :entity, :currency, :alphabetic_code, :numeric_code, :minor_unit, :active
  #
  # or
  #
  # permit_params do
  #   permitted = [:entity, :currency, :alphabetic_code, :numeric_code, :minor_unit, :active]
  #   permitted << :other if params[:action] == 'create' && current_user.admin?
  #   permitted
  # end

end
geekelo commented 1 month ago

This ActiveAdmin configuration manages the Currency model in your application, allowing administrators to view and manage currency records with specific constraints.

File: currency.rb

1. Actions Configuration

2. Permitted Parameters

3. Sorting Configuration

4. Scopes Configuration

5. Menu Configuration

6. Commented Permit Parameters

Summary: