thecore_ui_rails_admin 3.8.5 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86967d24b02baf579504a0a863522949ffdb7c935a62760a786921c172828324
4
- data.tar.gz: f17455de41bfa8955a6685a347bb8a31714e3a7640b665d1d873cf0388cf6393
3
+ metadata.gz: 07a3bdd2da6cd803dcf001890b3eb3396a2564a0d6fece15dff682179188b37d
4
+ data.tar.gz: bcf7ca824767d569b32d573cce6ad579a9511e1d34694793e78b8f9274aa130d
5
5
  SHA512:
6
- metadata.gz: 5841d2e2ee455acf24b89510b2fe6cbf772b80dc88c76fb5458d41703e74e1520cd1d5c4f5dd7b262ee15d8028404ac1c7fbd0caeeafc9f8f311d2b2a18c08d4
7
- data.tar.gz: e865ceafc3ecbd6488f6f97ffc7eecbd8c9d504e7d006e744b4a2579cb2ff5f1ed156c302ffe55d308ff462d5be585fd1ad2d056f269eab987de09b8526e3fa5
6
+ metadata.gz: d15119d48001ba2089fdf78cb4870c2080b8fd3235385df8196e1009ce94a9bfb480fe4cba2ad3b0a5b8ec5a6c655d62280617fb065ba56240c9fa9de0b02935
7
+ data.tar.gz: f9cec2f83d2d8cc6a6948f5988d00283fbc0e52591f51e4b6f11e20a34288646814a64c867559430b93f24aa06f0ad21ece3ffd828545a18540c16ed0934326f
@@ -12,7 +12,7 @@ module Api::UserPreference
12
12
  # - methods: include the result of some method defined in the model
13
13
  # - include: include associated models, it's an object {} which also accepts the keys described here
14
14
  cattr_accessor :json_attrs
15
- self.json_attrs = ::ModelDrivenApi.smart_merge (json_attrs || {}), {}
15
+ self.json_attrs = ::ThecoreBackendCommons.smart_merge (json_attrs || {}), {}
16
16
 
17
17
  # Custom action callable by the API must be defined in /app/models/concerns/endpoints/
18
18
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ThecoreUiRailsAdmin
2
- VERSION = "3.8.5".freeze
2
+ VERSION = "3.8.7".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_ui_rails_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.5
4
+ version: 3.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
@@ -57,14 +57,14 @@ dependencies:
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '3.4'
60
+ version: '3.8'
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: '3.4'
67
+ version: '3.8'
68
68
  description: Holds all base dependencies and configurations to have a thecore integrated
69
69
  with Rails Admin.
70
70
  email:
@@ -109,7 +109,6 @@ files:
109
109
  - app/assets/stylesheets/rails_admin/custom/theming.scss
110
110
  - app/assets/stylesheets/rails_admin/custom/variables.scss
111
111
  - app/models/concerns/api/user_preference.rb
112
- - app/models/concerns/endpoints/user_preference.rb
113
112
  - app/models/concerns/rails_admin/user_preference.rb
114
113
  - app/models/saved_filter.rb
115
114
  - app/models/user_preference.rb
@@ -1,78 +0,0 @@
1
- class Endpoints::UserPreference < NonCrudEndpoints
2
- # self.desc 'UserPreference', :test, {
3
- # # Define the action name using openapi swagger format
4
- # get: {
5
- # summary: "Test API Custom Action",
6
- # description: "This is a test API custom action",
7
- # operationId: "test",
8
- # tags: ["Test"],
9
- # parameters: [
10
- # {
11
- # name: "explain",
12
- # in: "query",
13
- # description: "Explain the action by returning this openapi schema",
14
- # required: true,
15
- # schema: {
16
- # type: "boolean"
17
- # }
18
- # }
19
- # ],
20
- # responses: {
21
- # 200 => {
22
- # description: "The openAPI json schema for this action",
23
- # content: {
24
- # "application/json": {
25
- # schema: {
26
- # type: "object",
27
- # additionalProperties: true
28
- # }
29
- # }
30
- # }
31
- # },
32
- # 501 => {
33
- # error: :string,
34
- # }
35
- # }
36
- # },
37
- # post: {
38
- # summary: "Test API Custom Action",
39
- # description: "This is a test API custom action",
40
- # operationId: "test",
41
- # tags: ["Test"],
42
- # requestBody: {
43
- # required: true,
44
- # content: {
45
- # "application/json": {}
46
- # }
47
- # },
48
- # responses: {
49
- # 200 => {
50
- # description: "The openAPI json schema for this action",
51
- # # This will return the object with a message string and a params object
52
- # content: {
53
- # "application/json": {
54
- # schema: {
55
- # type: "object",
56
- # properties: {
57
- # message: {
58
- # type: "string"
59
- # },
60
- # params: {
61
- # type: "object",
62
- # additionalProperties: true
63
- # }
64
- # }
65
- # }
66
- # }
67
- # }
68
- # },
69
- # 501 => {
70
- # error: :string,
71
- # }
72
- # }
73
- # }
74
- # }
75
- # def test(params)
76
- # return { message: "Hello World From Test API Custom Action called test", params: params }, 200
77
- # end
78
- end