rails_admin 2.0.1 → 2.0.2
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.
Potentially problematic release.
This version of rails_admin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/app/assets/javascripts/rails_admin/ra.nested-form-hooks.js +4 -2
- data/app/assets/javascripts/rails_admin/ra.widgets.js +11 -3
- data/app/views/rails_admin/main/index.html.haml +1 -1
- data/config/locales/rails_admin.en.yml +1 -0
- data/lib/rails_admin/adapters/active_record/abstract_object.rb +2 -2
- data/lib/rails_admin/config/lazy_model.rb +4 -4
- data/lib/rails_admin/config/model.rb +2 -2
- data/lib/rails_admin/config/proxyable/proxy.rb +4 -4
- data/lib/rails_admin/extension.rb +1 -1
- data/lib/rails_admin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b602512e6e725b80b4710d009beb60fffc8089f20a677579174f5af05ed7a728
|
4
|
+
data.tar.gz: b983654e17ee5f1a15bab17d2d5afbba7f06eb7d8b6f4be92112f5e9ad41ddf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2ec664fd9c217fd62d3ca65af5718e095f8de4ac3919ea0fe29b2e8d203e984583dd11877aa1ff8c40e2e8a696e55f304f24312da87da08051ba0a2bc33c99a
|
7
|
+
data.tar.gz: d2350c08e53ba3ed67e65bdd75863f4fd02b7c26ace2fdcafae81363b6567d6c5db52bcb2631224d0f5d291e46a9e577187fdcdc4bbc6e96613083dd8266b948
|
data/README.md
CHANGED
@@ -16,6 +16,12 @@
|
|
16
16
|
|
17
17
|
RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data.
|
18
18
|
|
19
|
+
## Announcements
|
20
|
+
|
21
|
+
### [Action required] Security issue
|
22
|
+
|
23
|
+
**RailsAdmin 2.0.1, 2.0.0 and up to 1.4.2 have been reported to have XSS vulnerability.** We strongly recommend that you upgrade RailsAdmin to 2.0.2 (and higher) or 1.4.3 as soon as possible, if you are on those versions. See [d72090ec](https://github.com/sferik/rails_admin/commit/d72090ec6a07c3b9b7b48ab50f3d405f91ff4375) for the detail.
|
24
|
+
|
19
25
|
## Getting started
|
20
26
|
|
21
27
|
* Check out [the docs][docs].
|
@@ -93,6 +99,7 @@ This library aims to support and is [tested against][travis] the following Ruby
|
|
93
99
|
* Ruby 2.4
|
94
100
|
* Ruby 2.5
|
95
101
|
* Ruby 2.6
|
102
|
+
* Ruby 2.7
|
96
103
|
* [JRuby][]
|
97
104
|
|
98
105
|
[jruby]: http://jruby.org/
|
@@ -11,7 +11,9 @@
|
|
11
11
|
$(document).on('nested:fieldAdded', 'form', function(content) {
|
12
12
|
var controls, field, nav, new_tab, one_to_one, parent_group, toggler;
|
13
13
|
field = content.field.addClass('tab-pane').attr('id', 'unique-id-' + (new Date().getTime()));
|
14
|
-
new_tab = $('<li
|
14
|
+
new_tab = $('<li></li>').append(
|
15
|
+
$('<a></a>').attr('data-toggle', 'tab').attr('href', '#' + field.attr('id')).text(field.children('.object-infos').data('object-label'))
|
16
|
+
)
|
15
17
|
parent_group = field.closest('.control-group');
|
16
18
|
controls = parent_group.children('.controls');
|
17
19
|
one_to_one = controls.data('nestedone') !== void 0;
|
@@ -27,7 +29,7 @@
|
|
27
29
|
content.select(':hidden').show('slow');
|
28
30
|
toggler.addClass('active').removeClass('disabled').children('i').addClass('icon-chevron-down').removeClass('icon-chevron-right');
|
29
31
|
if (one_to_one) {
|
30
|
-
controls.find('.add_nested_fields').removeClass('add_nested_fields').
|
32
|
+
controls.find('.add_nested_fields').removeClass('add_nested_fields').text(field.children('.object-infos').data('object-label'));
|
31
33
|
}
|
32
34
|
});
|
33
35
|
|
@@ -137,7 +137,11 @@
|
|
137
137
|
toggler = field.find('> .controls > .btn-group > .toggler');
|
138
138
|
tab_content.children('.fields:not(.tab-pane)').addClass('tab-pane').each(function() {
|
139
139
|
$(this).attr('id', 'unique-id-' + (new Date().getTime()) + Math.floor(Math.random() * 100000));
|
140
|
-
nav.append(
|
140
|
+
nav.append(
|
141
|
+
$('<li></li>').append(
|
142
|
+
$('<a></a>').attr('data-toggle', 'tab').attr('href', '#' + this.id).text($(this).children('.object-infos').data('object-label'))
|
143
|
+
)
|
144
|
+
);
|
141
145
|
});
|
142
146
|
if (nav.find("> li.active").length === 0) {
|
143
147
|
nav.find("> li > a[data-toggle='tab']:first").tab('show');
|
@@ -165,8 +169,12 @@
|
|
165
169
|
tab_content = field.find("> .tab-content");
|
166
170
|
toggler = field.find('> .controls > .btn-group > .toggler');
|
167
171
|
tab_content.children(".fields:not(.tab-pane)").addClass('tab-pane active').each(function() {
|
168
|
-
field.find('> .controls .add_nested_fields').removeClass('add_nested_fields').
|
169
|
-
nav.append(
|
172
|
+
field.find('> .controls .add_nested_fields').removeClass('add_nested_fields').text($(this).children('.object-infos').data('object-label'));
|
173
|
+
nav.append(
|
174
|
+
$('<li></li>').append(
|
175
|
+
$('<a></a>').attr('data-toggle', 'tab').attr('href', '#' + this.id).text($(this).children('.object-infos').data('object-label'))
|
176
|
+
)
|
177
|
+
);
|
170
178
|
});
|
171
179
|
first_tab = nav.find("> li > a[data-toggle='tab']:first");
|
172
180
|
first_tab.tab('show');
|
@@ -53,7 +53,7 @@
|
|
53
53
|
%button.btn.btn-primary{type: 'submit', :'data-disable-with' => '<i class="icon-white icon-refresh"></i> '.html_safe + t('admin.misc.refresh')}
|
54
54
|
%i.icon-white.icon-refresh
|
55
55
|
= t('admin.misc.refresh')
|
56
|
-
%button#remove_filter.btn.btn-info{title:
|
56
|
+
%button#remove_filter.btn.btn-info{title: t('admin.misc.reset_filters')}
|
57
57
|
%i.icon-white.icon-remove
|
58
58
|
- if export_action
|
59
59
|
%span{style: 'float:right'}= link_to wording_for(:link, export_action), export_path(params.except('set').except('page')), class: 'btn btn-info'
|
@@ -56,12 +56,12 @@ module RailsAdmin
|
|
56
56
|
@model
|
57
57
|
end
|
58
58
|
|
59
|
-
def method_missing(
|
60
|
-
target.send(
|
59
|
+
def method_missing(method_name, *args, &block)
|
60
|
+
target.send(method_name, *args, &block)
|
61
61
|
end
|
62
62
|
|
63
|
-
def respond_to?(
|
64
|
-
super || target.respond_to?(
|
63
|
+
def respond_to?(method_name, include_private = false)
|
64
|
+
super || target.respond_to?(method_name, include_private)
|
65
65
|
end
|
66
66
|
end
|
67
67
|
end
|
@@ -100,8 +100,8 @@ module RailsAdmin
|
|
100
100
|
|
101
101
|
# Act as a proxy for the base section configuration that actually
|
102
102
|
# store the configurations.
|
103
|
-
def method_missing(
|
104
|
-
send(:base).send(
|
103
|
+
def method_missing(method_name, *args, &block)
|
104
|
+
send(:base).send(method_name, *args, &block)
|
105
105
|
end
|
106
106
|
end
|
107
107
|
end
|
@@ -17,18 +17,18 @@ module RailsAdmin
|
|
17
17
|
self
|
18
18
|
end
|
19
19
|
|
20
|
-
def method_missing(
|
21
|
-
if @object.respond_to?(
|
20
|
+
def method_missing(method_name, *args, &block)
|
21
|
+
if @object.respond_to?(method_name)
|
22
22
|
reset = @object.bindings
|
23
23
|
begin
|
24
24
|
@object.bindings = @bindings
|
25
|
-
response = @object.__send__(
|
25
|
+
response = @object.__send__(method_name, *args, &block)
|
26
26
|
ensure
|
27
27
|
@object.bindings = reset
|
28
28
|
end
|
29
29
|
response
|
30
30
|
else
|
31
|
-
super(
|
31
|
+
super(method_name, *args, &block)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -33,7 +33,7 @@ module RailsAdmin
|
|
33
33
|
(AUTHORIZATION_ADAPTERS.values + AUDITING_ADAPTERS.values).each do |klass|
|
34
34
|
begin
|
35
35
|
klass.setup if klass.respond_to? :setup
|
36
|
-
rescue # rubocop:disable Lint/HandleExceptions
|
36
|
+
rescue # rubocop:disable Lint/HandleExceptions, Style/RescueStandardError
|
37
37
|
# ignore errors
|
38
38
|
end
|
39
39
|
end
|
data/lib/rails_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Michaels-Ober
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2020-03-17 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: builder
|