diff --git a/app/assets/stylesheets/active_admin_custom.scss b/app/assets/stylesheets/active_admin_custom.scss index 0a2be6d0a..fad7c5735 100644 --- a/app/assets/stylesheets/active_admin_custom.scss +++ b/app/assets/stylesheets/active_admin_custom.scss @@ -71,7 +71,17 @@ width: 16% !important; display: table-row-group; } - + + form fieldset > ol > li.boolean label[for="school_active"], + form fieldset > ol > li.boolean label[for="allowed_user_email_masks_active"] { + display: inline-flex; + align-items: center; + font-weight: bold; + margin-left: 0; + cursor: pointer; + padding-left: 16%; + } + body.active_admin { #hold_change_cancel_action { margin-right: 10px; diff --git a/app/models/allowed_user_email_masks.rb b/app/models/allowed_user_email_masks.rb index 24b6ad353..2f477ff6b 100644 --- a/app/models/allowed_user_email_masks.rb +++ b/app/models/allowed_user_email_masks.rb @@ -12,6 +12,11 @@ class AllowedUserEmailMasks < ActiveRecord::Base # Setup accessible (or protected) attributes for your model # attr_accessible :email_pattern, :active, :created_at, :updated_at + # Define searchable attributes for Ransack + def self.ransackable_attributes(auth_object = nil) + ["email_pattern", "active", "created_at", "updated_at"] # List allowed fields here + end + before_create :normalize_email_strings before_update :normalize_email_strings