avo 2.9.1.pre2 → 2.9.1.pre3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/builds/avo.js +63 -63
- data/app/assets/builds/avo.js.map +2 -2
- data/app/components/avo/fields/date_time_field/edit_component.html.erb +11 -8
- data/app/components/avo/fields/date_time_field/index_component.html.erb +9 -1
- data/app/components/avo/fields/date_time_field/show_component.html.erb +9 -1
- data/app/components/avo/views/resource_edit_component.rb +1 -1
- data/app/javascript/js/controllers/fields/date_field_controller.js +68 -21
- data/lib/avo/base_resource.rb +1 -1
- data/lib/avo/concerns/handles_field_args.rb +1 -1
- data/lib/avo/fields/date_time_field.rb +13 -9
- data/lib/avo/version.rb +1 -1
- data/public/avo-assets/avo.js +63 -63
- data/public/avo-assets/avo.js.map +2 -2
- metadata +2 -3
- data/lib/avo/concerns/model_class_constantized.rb +0 -23
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.1.
|
4
|
+
version: 2.9.1.pre3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Marin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-06-
|
12
|
+
date: 2022-06-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -1179,7 +1179,6 @@ files:
|
|
1179
1179
|
- lib/avo/concerns/has_model.rb
|
1180
1180
|
- lib/avo/concerns/has_stimulus_controllers.rb
|
1181
1181
|
- lib/avo/concerns/has_tools.rb
|
1182
|
-
- lib/avo/concerns/model_class_constantized.rb
|
1183
1182
|
- lib/avo/configuration.rb
|
1184
1183
|
- lib/avo/dashboards/base_dashboard.rb
|
1185
1184
|
- lib/avo/dashboards/base_divider.rb
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module Avo
|
2
|
-
module Concerns
|
3
|
-
module ModelClassConstantized
|
4
|
-
extend ActiveSupport::Concern
|
5
|
-
|
6
|
-
class_methods do
|
7
|
-
attr_reader :model_class
|
8
|
-
|
9
|
-
# Cast the model class to a constantized version and memoize it like that
|
10
|
-
def model_class=(value)
|
11
|
-
@model_class = case value
|
12
|
-
when Class
|
13
|
-
value
|
14
|
-
when String, Symbol
|
15
|
-
value.to_s.safe_constantize
|
16
|
-
else
|
17
|
-
raise ArgumentError.new "Failed to find a proper model class for #{self.to_s}"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|