thecore_ui_rails_admin 3.8.6 → 3.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/initializers/concern_user.rb +10 -0
- data/lib/thecore_ui_rails_admin/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 07a3bdd2da6cd803dcf001890b3eb3396a2564a0d6fece15dff682179188b37d
|
|
4
|
+
data.tar.gz: bcf7ca824767d569b32d573cce6ad579a9511e1d34694793e78b8f9274aa130d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d15119d48001ba2089fdf78cb4870c2080b8fd3235385df8196e1009ce94a9bfb480fe4cba2ad3b0a5b8ec5a6c655d62280617fb065ba56240c9fa9de0b02935
|
|
7
|
+
data.tar.gz: f9cec2f83d2d8cc6a6948f5988d00283fbc0e52591f51e4b6f11e20a34288646814a64c867559430b93f24aa06f0ad21ece3ffd828545a18540c16ed0934326f
|
|
@@ -4,6 +4,11 @@ require "active_support/concern"
|
|
|
4
4
|
module ThecoreUiRailsAdminUserConcern
|
|
5
5
|
extend ActiveSupport::Concern
|
|
6
6
|
|
|
7
|
+
def self.password_help
|
|
8
|
+
length = ::User.password_length
|
|
9
|
+
"#{I18n.t("admin.form.required")}. #{I18n.t("admin.form.char_length_of").capitalize} #{length.min}-#{length.max}."
|
|
10
|
+
end
|
|
11
|
+
|
|
7
12
|
included do
|
|
8
13
|
has_many :saved_filters, class_name: "SavedFilter", foreign_key: :admin_user_id, dependent: :destroy
|
|
9
14
|
has_many :user_preferences, class_name: "UserPreference", foreign_key: :user_id, dependent: :destroy, inverse_of: :user
|
|
@@ -81,6 +86,11 @@ module ThecoreUiRailsAdminUserConcern
|
|
|
81
86
|
create do
|
|
82
87
|
configure :password do
|
|
83
88
|
required true
|
|
89
|
+
# Devise 5 declares the password length limits as Procs, which
|
|
90
|
+
# RailsAdmin's generic help compares with Integers: the create form
|
|
91
|
+
# raised "comparison of Integer with Proc failed". Same text as
|
|
92
|
+
# before, read from User.password_length on every render.
|
|
93
|
+
help { ThecoreUiRailsAdminUserConcern.password_help }
|
|
84
94
|
end
|
|
85
95
|
configure :password_confirmation do
|
|
86
96
|
required true
|