Open geekelo opened 1 month ago
This ActiveAdmin configuration manages the Currency
model in your application, allowing administrators to view and manage currency records with specific constraints.
currency.rb
actions :all, except: :destroy
destroy
. This prevents the deletion of currency records, which might be critical to your system's operations.permit_params :active
active
attribute can be modified through the admin interface, controlling whether a currency is active or inactive.config.sort_order = 'entity_asc'
entity
attribute in ascending order by default.scope('Active', default: true) { |scope| scope.where(active: true) }
scope('Inactive') { |scope| scope.where(active: false) }
menu parent: 'Configuration', label: 'Currencies'
Currency
resource is placed under the "Configuration" menu with the label "Currencies."permit_params
entity
, currency
, alphabetic_code
, numeric_code
, minor_unit
) that could be permitted if needed. These could be uncommented if you later decide to allow modifications to these fields.active
field can be modified.
FILE