activeadmin 2.6.0 → 2.8.0
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/CHANGELOG.md +90 -7
- data/CONTRIBUTING.md +5 -33
- data/README.md +1 -1
- data/app/assets/javascripts/active_admin/base.js +13 -15
- data/app/assets/stylesheets/active_admin/_header.scss +37 -3
- data/app/assets/stylesheets/active_admin/components/_comments.scss +2 -2
- data/app/assets/stylesheets/active_admin/mixins/_variables.scss +3 -0
- data/app/javascript/active_admin/initializers/per-page.js +1 -1
- data/app/javascript/active_admin/lib/checkbox-toggler.js +3 -3
- data/app/javascript/active_admin/lib/dropdown-menu.js +1 -1
- data/app/javascript/active_admin/lib/modal-dialog.js +7 -7
- data/app/javascript/active_admin/lib/per-page.js +1 -1
- data/app/javascript/active_admin/lib/table-checkbox-toggler.js +1 -1
- data/app/views/layouts/active_admin_logged_out.html.erb +15 -5
- data/config/locales/ar.yml +6 -6
- data/config/locales/en-CA.yml +3 -3
- data/config/locales/en-GB.yml +3 -3
- data/config/locales/en.yml +3 -3
- data/config/locales/es-MX.yml +2 -1
- data/config/locales/es.yml +2 -2
- data/config/locales/it.yml +18 -0
- data/config/locales/ja.yml +3 -3
- data/config/locales/lv.yml +2 -2
- data/config/locales/vi.yml +6 -5
- data/docs/0-installation.md +26 -2
- data/docs/11-decorators.md +16 -5
- data/docs/2-resource-customization.md +10 -1
- data/docs/Gemfile.lock +42 -31
- data/docs/_includes/top-menu.html +1 -1
- data/docs/documentation.md +1 -1
- data/docs/index.html +6 -6
- data/lib/active_admin/application.rb +6 -6
- data/lib/active_admin/authorization_adapter.rb +3 -3
- data/lib/active_admin/base_controller/authorization.rb +9 -9
- data/lib/active_admin/batch_actions/controller.rb +3 -3
- data/lib/active_admin/batch_actions/views/batch_action_form.rb +1 -1
- data/lib/active_admin/batch_actions/views/batch_action_selector.rb +5 -5
- data/lib/active_admin/collection_decorator.rb +31 -0
- data/lib/active_admin/csv_builder.rb +11 -7
- data/lib/active_admin/dependency.rb +7 -7
- data/lib/active_admin/filters/forms.rb +3 -3
- data/lib/active_admin/filters/resource_extension.rb +1 -1
- data/lib/active_admin/filters.rb +1 -1
- data/lib/active_admin/form_builder.rb +5 -5
- data/lib/active_admin/helpers/optional_display.rb +2 -2
- data/lib/active_admin/inputs/filters/base/search_method_select.rb +2 -2
- data/lib/active_admin/localizers/resource_localizer.rb +1 -1
- data/lib/active_admin/menu.rb +5 -2
- data/lib/active_admin/menu_item.rb +7 -7
- data/lib/active_admin/namespace.rb +7 -7
- data/lib/active_admin/namespace_settings.rb +3 -0
- data/lib/active_admin/orm/active_record/comments/comment.rb +3 -3
- data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +3 -3
- data/lib/active_admin/orm/active_record/comments.rb +11 -11
- data/lib/active_admin/pundit_adapter.rb +4 -4
- data/lib/active_admin/resource/action_items.rb +1 -1
- data/lib/active_admin/resource/menu.rb +4 -4
- data/lib/active_admin/resource/naming.rb +4 -4
- data/lib/active_admin/resource/routes.rb +5 -5
- data/lib/active_admin/resource/scope_to.rb +7 -7
- data/lib/active_admin/resource_controller/data_access.rb +1 -1
- data/lib/active_admin/resource_controller/decorators.rb +5 -25
- data/lib/active_admin/resource_controller.rb +4 -3
- data/lib/active_admin/resource_dsl.rb +5 -5
- data/lib/active_admin/scope.rb +5 -5
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/view_factory.rb +16 -16
- data/lib/active_admin/view_helpers/breadcrumb_helper.rb +1 -1
- data/lib/active_admin/view_helpers/display_helper.rb +3 -3
- data/lib/active_admin/view_helpers/fields_for.rb +1 -1
- data/lib/active_admin/views/components/attributes_table.rb +2 -2
- data/lib/active_admin/views/components/dropdown_menu.rb +2 -2
- data/lib/active_admin/views/components/index_list.rb +1 -1
- data/lib/active_admin/views/components/menu_item.rb +1 -1
- data/lib/active_admin/views/components/paginated_collection.rb +14 -14
- data/lib/active_admin/views/components/scopes.rb +2 -0
- data/lib/active_admin/views/components/table_for.rb +11 -11
- data/lib/active_admin/views/components/tabs.rb +1 -1
- data/lib/active_admin/views/index_as_table.rb +6 -6
- data/lib/active_admin/views/pages/base.rb +4 -2
- data/lib/active_admin/views/pages/index.rb +8 -8
- data/lib/active_admin.rb +43 -43
- data/lib/generators/active_admin/assets/templates/active_admin.scss +2 -2
- data/lib/generators/active_admin/devise/devise_generator.rb +4 -4
- data/lib/generators/active_admin/install/install_generator.rb +7 -1
- data/lib/generators/active_admin/install/templates/active_admin.rb.erb +9 -2
- data/lib/generators/active_admin/resource/resource_generator.rb +1 -1
- data/lib/generators/active_admin/webpacker/plugins/jquery.js +7 -0
- data/lib/generators/active_admin/webpacker/templates/active_admin.js +5 -0
- data/lib/generators/active_admin/webpacker/templates/active_admin.scss +17 -0
- data/lib/generators/active_admin/webpacker/templates/print.scss +2 -0
- data/lib/generators/active_admin/webpacker/webpacker_generator.rb +26 -0
- metadata +20 -8
data/config/locales/en-CA.yml
CHANGED
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
default_confirmation: "Are you sure you want to do this?"
|
|
69
69
|
delete_confirmation: "Are you sure you want to delete these %{plural_model}?"
|
|
70
70
|
succesfully_destroyed:
|
|
71
|
-
one: "Successfully
|
|
72
|
-
other: "Successfully
|
|
71
|
+
one: "Successfully deleted 1 %{model}"
|
|
72
|
+
other: "Successfully deleted %{count} %{plural_model}"
|
|
73
73
|
selection_toggle_explanation: "(Toggle Selection)"
|
|
74
74
|
action_label: "%{title} Selected"
|
|
75
75
|
labels:
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
author: "Author"
|
|
83
83
|
add: "Add Comment"
|
|
84
84
|
delete: "Delete Comment"
|
|
85
|
-
delete_confirmation: "Are you sure you want to delete these
|
|
85
|
+
delete_confirmation: "Are you sure you want to delete these comments?"
|
|
86
86
|
resource: "Resource"
|
|
87
87
|
no_comments_yet: "No comments yet."
|
|
88
88
|
author_missing: "Anonymous"
|
data/config/locales/en-GB.yml
CHANGED
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
default_confirmation: "Are you sure you want to do this?"
|
|
69
69
|
delete_confirmation: "Are you sure you want to delete these %{plural_model}?"
|
|
70
70
|
succesfully_destroyed:
|
|
71
|
-
one: "Successfully
|
|
72
|
-
other: "Successfully
|
|
71
|
+
one: "Successfully deleted 1 %{model}"
|
|
72
|
+
other: "Successfully deleted %{count} %{plural_model}"
|
|
73
73
|
selection_toggle_explanation: "(Toggle Selection)"
|
|
74
74
|
action_label: "%{title} Selected"
|
|
75
75
|
labels:
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
author: "Author"
|
|
83
83
|
add: "Add Comment"
|
|
84
84
|
delete: "Delete Comment"
|
|
85
|
-
delete_confirmation: "Are you sure you want to delete these
|
|
85
|
+
delete_confirmation: "Are you sure you want to delete these comments?"
|
|
86
86
|
resource: "Resource"
|
|
87
87
|
no_comments_yet: "No comments yet."
|
|
88
88
|
author_missing: "Anonymous"
|
data/config/locales/en.yml
CHANGED
|
@@ -91,8 +91,8 @@ en:
|
|
|
91
91
|
default_confirmation: "Are you sure you want to do this?"
|
|
92
92
|
delete_confirmation: "Are you sure you want to delete these %{plural_model}?"
|
|
93
93
|
succesfully_destroyed:
|
|
94
|
-
one: "Successfully
|
|
95
|
-
other: "Successfully
|
|
94
|
+
one: "Successfully deleted 1 %{model}"
|
|
95
|
+
other: "Successfully deleted %{count} %{plural_model}"
|
|
96
96
|
selection_toggle_explanation: "(Toggle Selection)"
|
|
97
97
|
action_label: "%{title} Selected"
|
|
98
98
|
labels:
|
|
@@ -105,7 +105,7 @@ en:
|
|
|
105
105
|
author: "Author"
|
|
106
106
|
add: "Add Comment"
|
|
107
107
|
delete: "Delete Comment"
|
|
108
|
-
delete_confirmation: "Are you sure you want to delete these
|
|
108
|
+
delete_confirmation: "Are you sure you want to delete these comments?"
|
|
109
109
|
resource: "Resource"
|
|
110
110
|
no_comments_yet: "No comments yet."
|
|
111
111
|
author_missing: "Anonymous"
|
data/config/locales/es-MX.yml
CHANGED
|
@@ -86,7 +86,8 @@ es-MX:
|
|
|
86
86
|
title: "Cambie su contraseña"
|
|
87
87
|
submit: "Cambiar mi contraseña"
|
|
88
88
|
links:
|
|
89
|
-
sign_in: "
|
|
89
|
+
sign_in: "Iniciar Sesión"
|
|
90
|
+
sign_up: "Registrarse"
|
|
90
91
|
forgot_your_password: "¿Olvidó su contraseña?"
|
|
91
92
|
sign_in_with_omniauth_provider: "Conéctate con %{provider}"
|
|
92
93
|
index_list:
|
data/config/locales/es.yml
CHANGED
|
@@ -143,8 +143,8 @@ es:
|
|
|
143
143
|
title: "Reenviar instrucciones de confirmación"
|
|
144
144
|
submit: "Reenviar instrucciones de confirmación"
|
|
145
145
|
links:
|
|
146
|
-
sign_up: "
|
|
147
|
-
sign_in: "
|
|
146
|
+
sign_up: "Registrarse"
|
|
147
|
+
sign_in: "Iniciar Sesión"
|
|
148
148
|
forgot_your_password: "¿Olvidó su contraseña?"
|
|
149
149
|
sign_in_with_omniauth_provider: "Conéctate con %{provider}"
|
|
150
150
|
resend_unlock_instructions: "Reenviar instrucciones de desbloqueo"
|
data/config/locales/it.yml
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
it:
|
|
2
|
+
activerecord:
|
|
3
|
+
models:
|
|
4
|
+
comment:
|
|
5
|
+
one: "Commento"
|
|
6
|
+
other: "Commenti"
|
|
7
|
+
active_admin/comment:
|
|
8
|
+
one: "Commento"
|
|
9
|
+
other: "Commenti"
|
|
10
|
+
attributes:
|
|
11
|
+
active_admin/comment:
|
|
12
|
+
author_type: "Tipo di Autore"
|
|
13
|
+
body: "Corpo"
|
|
14
|
+
created_at: "Creato il"
|
|
15
|
+
namespace: "Namespace"
|
|
16
|
+
resource_type: "Tipo di risorsa"
|
|
17
|
+
updated_at: "Aggiornato il"
|
|
2
18
|
active_admin:
|
|
3
19
|
dashboard: Dashboard
|
|
4
20
|
dashboard_welcome:
|
|
@@ -37,6 +53,8 @@ it:
|
|
|
37
53
|
lteq_datetime: "Minore o uguale a"
|
|
38
54
|
from: "Da"
|
|
39
55
|
to: "A"
|
|
56
|
+
scopes:
|
|
57
|
+
all: "Tutti"
|
|
40
58
|
search_status:
|
|
41
59
|
headline: "Situazione filtri:"
|
|
42
60
|
current_scope: "Contesto selezionato:"
|
data/config/locales/ja.yml
CHANGED
|
@@ -8,7 +8,7 @@ ja:
|
|
|
8
8
|
edit: "編集"
|
|
9
9
|
delete: "削除"
|
|
10
10
|
delete_confirmation: "本当に削除しますか?"
|
|
11
|
-
create_another: "%{model}
|
|
11
|
+
create_another: "%{model} を続けて作成する"
|
|
12
12
|
new_model: "%{model} を作成する"
|
|
13
13
|
edit_model: "%{model} を編集する"
|
|
14
14
|
delete_model: "%{model} を削除する"
|
|
@@ -18,7 +18,7 @@ ja:
|
|
|
18
18
|
previous: "前"
|
|
19
19
|
next: "次"
|
|
20
20
|
download: "ダウンロード:"
|
|
21
|
-
has_many_new: "
|
|
21
|
+
has_many_new: "%{model} を追加する"
|
|
22
22
|
has_many_delete: "削除する"
|
|
23
23
|
has_many_remove: "削除する"
|
|
24
24
|
filters:
|
|
@@ -26,7 +26,7 @@ ja:
|
|
|
26
26
|
filter: "絞り込む"
|
|
27
27
|
clear: "条件を削除する"
|
|
28
28
|
predicates:
|
|
29
|
-
contains: "
|
|
29
|
+
contains: "を含む"
|
|
30
30
|
equals: "等しい"
|
|
31
31
|
starts_with: "で始まる"
|
|
32
32
|
ends_with: "で終わる"
|
data/config/locales/lv.yml
CHANGED
|
@@ -60,8 +60,8 @@ lv:
|
|
|
60
60
|
default_confirmation: "Vai tiešām vēlaties to darīt?"
|
|
61
61
|
delete_confirmation: "Vai tiešām vēlaties dzēst šos %{plural_model}?"
|
|
62
62
|
succesfully_destroyed:
|
|
63
|
-
one: "Successfully
|
|
64
|
-
other: "Successfully
|
|
63
|
+
one: "Successfully deleted 1 %{model}"
|
|
64
|
+
other: "Successfully deleted %{count} %{plural_model}"
|
|
65
65
|
selection_toggle_explanation: "(Toggle Selection)"
|
|
66
66
|
action_label: "%{title} Selected"
|
|
67
67
|
labels:
|
data/config/locales/vi.yml
CHANGED
|
@@ -3,20 +3,21 @@ vi:
|
|
|
3
3
|
dashboard: Bảng điều khiển
|
|
4
4
|
dashboard_welcome:
|
|
5
5
|
welcome: "Chào mừng bạn đến với Active Admin. Đây là trang điều khiển mặc định."
|
|
6
|
-
call_to_action: "Để thêm
|
|
6
|
+
call_to_action: "Để thêm thành phần cho trang điều khiển hãy chỉnh sửa 'app/admin/dashboard.rb'"
|
|
7
7
|
view: "Xem"
|
|
8
8
|
edit: "Chỉnh sửa"
|
|
9
9
|
delete: "Xóa"
|
|
10
|
-
delete_confirmation: "Bạn có chắc chắn rằng mình muốn xóa
|
|
10
|
+
delete_confirmation: "Bạn có chắc chắn rằng mình muốn xóa không?"
|
|
11
11
|
new_model: "Tạo mới %{model}"
|
|
12
12
|
edit_model: "Chỉnh sửa %{model}"
|
|
13
13
|
delete_model: "Xóa %{model}"
|
|
14
|
+
create_another: "Tạo thêm %{model}"
|
|
14
15
|
details: "%{model} Chi tiết"
|
|
15
16
|
cancel: "Hủy"
|
|
16
17
|
empty: "Trống"
|
|
17
18
|
previous: "Trước"
|
|
18
|
-
next: "
|
|
19
|
-
download: "
|
|
19
|
+
next: "Sau"
|
|
20
|
+
download: "Tải về:"
|
|
20
21
|
has_many_new: "Thêm mới %{model}"
|
|
21
22
|
has_many_delete: "Xóa"
|
|
22
23
|
has_many_remove: "Hủy bỏ"
|
|
@@ -28,7 +29,7 @@ vi:
|
|
|
28
29
|
contains: "Có chứa"
|
|
29
30
|
equals: "Bằng"
|
|
30
31
|
starts_with: "Bắt đầu với"
|
|
31
|
-
ends_with: "Kết thúc
|
|
32
|
+
ends_with: "Kết thúc bởi"
|
|
32
33
|
greater_than: "Lớn hơn"
|
|
33
34
|
less_than: "Nhỏ hơn"
|
|
34
35
|
gteq_datetime: "Lớn hơn hoặc bằng"
|
data/docs/0-installation.md
CHANGED
|
@@ -51,8 +51,8 @@ The generator adds these core files, among others:
|
|
|
51
51
|
Now, migrate and seed your database before starting the server:
|
|
52
52
|
|
|
53
53
|
```sh
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
rails db:migrate
|
|
55
|
+
rails db:seed
|
|
56
56
|
rails server
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -112,6 +112,30 @@ Draper::CollectionDecorator.send :delegate, :per_page_kaminari
|
|
|
112
112
|
|
|
113
113
|
If you're getting the error `wrong number of arguments (6 for 4..5)`, [read #2703].
|
|
114
114
|
|
|
115
|
+
## webpacker
|
|
116
|
+
|
|
117
|
+
For new apps starting with Rails 6.0, Webpacker has become the default asset generator. You can **opt-in to using Webpacker for ActiveAdmin assets** as well by updating your configuration to turn on the `use_webpacker` option, either at installation time or manually.
|
|
118
|
+
|
|
119
|
+
* at active_admin installation:
|
|
120
|
+
|
|
121
|
+
```sh
|
|
122
|
+
rails g active_admin:install --use_webpacker
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
* manually:
|
|
126
|
+
|
|
127
|
+
```ruby
|
|
128
|
+
ActiveAdmin.setup do |config|
|
|
129
|
+
config.use_webpacker = true
|
|
130
|
+
end
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
And run the generator to get default Active Admin assets:
|
|
134
|
+
|
|
135
|
+
```sh
|
|
136
|
+
rails g active_admin:webpacker
|
|
137
|
+
```
|
|
138
|
+
|
|
115
139
|
[CHANGELOG]: https://github.com/activeadmin/activeadmin/blob/master/CHANGELOG.md
|
|
116
140
|
[dashboard.rb]: https://github.com/activeadmin/activeadmin/blob/master/lib/generators/active_admin/install/templates/dashboard.rb
|
|
117
141
|
[active_admin.rb]: https://github.com/activeadmin/activeadmin/blob/master/lib/generators/active_admin/install/templates/active_admin.rb.erb
|
data/docs/11-decorators.md
CHANGED
|
@@ -8,11 +8,6 @@ Active Admin allows you to use the decorator pattern to provide view-specific
|
|
|
8
8
|
versions of a resource. [Draper](https://github.com/drapergem/draper) is
|
|
9
9
|
recommended but not required.
|
|
10
10
|
|
|
11
|
-
To use decorator support without Draper, your decorator must support a variety
|
|
12
|
-
of collection methods to support pagination, filtering, etc. See
|
|
13
|
-
[this github issue discussion](https://github.com/activeadmin/activeadmin/issues/3600)
|
|
14
|
-
and [this gem](https://github.com/kiote/activeadmin-poro-decorator) for more details.
|
|
15
|
-
|
|
16
11
|
## Example usage
|
|
17
12
|
|
|
18
13
|
```ruby
|
|
@@ -42,6 +37,22 @@ ActiveAdmin.register Post do
|
|
|
42
37
|
end
|
|
43
38
|
```
|
|
44
39
|
|
|
40
|
+
You can pass any decorator class as an argument to `decorate_with`
|
|
41
|
+
as long as it accepts the record to be decorated as a parameter in
|
|
42
|
+
the initializer, and responds to all the necessary methods.
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
# app/decorators/post_decorator.rb
|
|
46
|
+
class PostDecorator
|
|
47
|
+
attr_reader :post
|
|
48
|
+
delegate_missing_to :post
|
|
49
|
+
|
|
50
|
+
def initialize(post)
|
|
51
|
+
@post = post
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
```
|
|
55
|
+
|
|
45
56
|
## Forms
|
|
46
57
|
|
|
47
58
|
By default, ActiveAdmin does *not* decorate the resource used to render forms.
|
|
@@ -164,7 +164,8 @@ The menu method accepts a hash with the following options:
|
|
|
164
164
|
|
|
165
165
|
* `:label` - The string or proc label to display in the menu. If it's a proc, it
|
|
166
166
|
will be called each time the menu is rendered.
|
|
167
|
-
* `:parent` - The string id (or label) of the parent used for this menu
|
|
167
|
+
* `:parent` - The string id (or label) of the parent used for this menu, or an array
|
|
168
|
+
of string ids (or labels) for a nested menu
|
|
168
169
|
* `:if` - A block or a symbol of a method to call to decide if the menu item
|
|
169
170
|
should be displayed
|
|
170
171
|
* `:priority` - The integer value of the priority, which defaults to `10`
|
|
@@ -227,6 +228,14 @@ end
|
|
|
227
228
|
Note that the "Blog" parent menu item doesn't even have to exist yet; it can be
|
|
228
229
|
dynamically generated for you.
|
|
229
230
|
|
|
231
|
+
To further nest an item under a submenu, provide an array of parents.
|
|
232
|
+
|
|
233
|
+
```ruby
|
|
234
|
+
ActiveAdmin.register Post do
|
|
235
|
+
menu parent: ["Admin", "Blog"]
|
|
236
|
+
end
|
|
237
|
+
```
|
|
238
|
+
|
|
230
239
|
### Customizing Parent Menu Items
|
|
231
240
|
|
|
232
241
|
All of the options given to a standard menu item are also available to
|
data/docs/Gemfile.lock
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
GEM
|
|
2
2
|
remote: https://rubygems.org/
|
|
3
3
|
specs:
|
|
4
|
-
activesupport (6.0.
|
|
4
|
+
activesupport (6.0.3.2)
|
|
5
5
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
6
6
|
i18n (>= 0.7, < 2)
|
|
7
7
|
minitest (~> 5.1)
|
|
8
8
|
tzinfo (~> 1.1)
|
|
9
|
-
zeitwerk (~> 2.2)
|
|
9
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
10
10
|
addressable (2.7.0)
|
|
11
11
|
public_suffix (>= 2.0.2, < 5.0)
|
|
12
12
|
coffee-script (2.4.1)
|
|
@@ -16,9 +16,9 @@ GEM
|
|
|
16
16
|
colorator (1.1.0)
|
|
17
17
|
commonmarker (0.17.13)
|
|
18
18
|
ruby-enum (~> 0.5)
|
|
19
|
-
concurrent-ruby (1.1.
|
|
20
|
-
dnsruby (1.61.
|
|
21
|
-
|
|
19
|
+
concurrent-ruby (1.1.6)
|
|
20
|
+
dnsruby (1.61.4)
|
|
21
|
+
simpleidn (~> 0.1)
|
|
22
22
|
em-websocket (0.5.1)
|
|
23
23
|
eventmachine (>= 0.12.9)
|
|
24
24
|
http_parser.rb (~> 0.6.0)
|
|
@@ -26,21 +26,21 @@ GEM
|
|
|
26
26
|
ffi (>= 1.3.0)
|
|
27
27
|
eventmachine (1.2.7)
|
|
28
28
|
execjs (2.7.0)
|
|
29
|
-
faraday (0.
|
|
29
|
+
faraday (1.0.1)
|
|
30
30
|
multipart-post (>= 1.2, < 3)
|
|
31
|
-
ffi (1.
|
|
31
|
+
ffi (1.13.1)
|
|
32
32
|
forwardable-extended (2.6.0)
|
|
33
33
|
gemoji (3.0.1)
|
|
34
|
-
github-pages (
|
|
34
|
+
github-pages (207)
|
|
35
35
|
github-pages-health-check (= 1.16.1)
|
|
36
|
-
jekyll (= 3.
|
|
36
|
+
jekyll (= 3.9.0)
|
|
37
37
|
jekyll-avatar (= 0.7.0)
|
|
38
38
|
jekyll-coffeescript (= 1.1.1)
|
|
39
39
|
jekyll-commonmark-ghpages (= 0.1.6)
|
|
40
40
|
jekyll-default-layout (= 0.1.4)
|
|
41
41
|
jekyll-feed (= 0.13.0)
|
|
42
42
|
jekyll-gist (= 1.5.0)
|
|
43
|
-
jekyll-github-metadata (= 2.
|
|
43
|
+
jekyll-github-metadata (= 2.13.0)
|
|
44
44
|
jekyll-mentions (= 1.5.1)
|
|
45
45
|
jekyll-optional-front-matter (= 0.3.2)
|
|
46
46
|
jekyll-paginate (= 1.1.0)
|
|
@@ -67,12 +67,13 @@ GEM
|
|
|
67
67
|
jekyll-theme-time-machine (= 0.1.1)
|
|
68
68
|
jekyll-titles-from-headings (= 0.5.3)
|
|
69
69
|
jemoji (= 0.11.1)
|
|
70
|
-
kramdown (=
|
|
70
|
+
kramdown (= 2.3.0)
|
|
71
|
+
kramdown-parser-gfm (= 1.1.0)
|
|
71
72
|
liquid (= 4.0.3)
|
|
72
73
|
mercenary (~> 0.3)
|
|
73
74
|
minima (= 2.5.1)
|
|
74
75
|
nokogiri (>= 1.10.4, < 2.0)
|
|
75
|
-
rouge (= 3.
|
|
76
|
+
rouge (= 3.19.0)
|
|
76
77
|
terminal-table (~> 1.4)
|
|
77
78
|
github-pages-health-check (1.16.1)
|
|
78
79
|
addressable (~> 2.3)
|
|
@@ -80,20 +81,20 @@ GEM
|
|
|
80
81
|
octokit (~> 4.0)
|
|
81
82
|
public_suffix (~> 3.0)
|
|
82
83
|
typhoeus (~> 1.3)
|
|
83
|
-
html-pipeline (2.
|
|
84
|
+
html-pipeline (2.13.0)
|
|
84
85
|
activesupport (>= 2)
|
|
85
86
|
nokogiri (>= 1.4)
|
|
86
87
|
http_parser.rb (0.6.0)
|
|
87
88
|
i18n (0.9.5)
|
|
88
89
|
concurrent-ruby (~> 1.0)
|
|
89
|
-
jekyll (3.
|
|
90
|
+
jekyll (3.9.0)
|
|
90
91
|
addressable (~> 2.4)
|
|
91
92
|
colorator (~> 1.0)
|
|
92
93
|
em-websocket (~> 0.5)
|
|
93
94
|
i18n (~> 0.7)
|
|
94
95
|
jekyll-sass-converter (~> 1.0)
|
|
95
96
|
jekyll-watch (~> 2.0)
|
|
96
|
-
kramdown (
|
|
97
|
+
kramdown (>= 1.17, < 3)
|
|
97
98
|
liquid (~> 4.0)
|
|
98
99
|
mercenary (~> 0.3.3)
|
|
99
100
|
pathutil (~> 0.9)
|
|
@@ -117,8 +118,8 @@ GEM
|
|
|
117
118
|
jekyll (>= 3.7, < 5.0)
|
|
118
119
|
jekyll-gist (1.5.0)
|
|
119
120
|
octokit (~> 4.2)
|
|
120
|
-
jekyll-github-metadata (2.
|
|
121
|
-
jekyll (
|
|
121
|
+
jekyll-github-metadata (2.13.0)
|
|
122
|
+
jekyll (>= 3.4, < 5.0)
|
|
122
123
|
octokit (~> 4.0, != 4.4.0)
|
|
123
124
|
jekyll-mentions (1.5.1)
|
|
124
125
|
html-pipeline (~> 2.3)
|
|
@@ -191,9 +192,12 @@ GEM
|
|
|
191
192
|
gemoji (~> 3.0)
|
|
192
193
|
html-pipeline (~> 2.2)
|
|
193
194
|
jekyll (>= 3.0, < 5.0)
|
|
194
|
-
kramdown (
|
|
195
|
+
kramdown (2.3.0)
|
|
196
|
+
rexml
|
|
197
|
+
kramdown-parser-gfm (1.1.0)
|
|
198
|
+
kramdown (~> 2.0)
|
|
195
199
|
liquid (4.0.3)
|
|
196
|
-
listen (3.2.
|
|
200
|
+
listen (3.2.1)
|
|
197
201
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
198
202
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
199
203
|
mercenary (0.3.6)
|
|
@@ -202,22 +206,24 @@ GEM
|
|
|
202
206
|
jekyll (>= 3.5, < 5.0)
|
|
203
207
|
jekyll-feed (~> 0.9)
|
|
204
208
|
jekyll-seo-tag (~> 2.1)
|
|
205
|
-
minitest (5.
|
|
209
|
+
minitest (5.14.1)
|
|
206
210
|
multipart-post (2.1.1)
|
|
207
|
-
nokogiri (1.10.
|
|
211
|
+
nokogiri (1.10.10)
|
|
208
212
|
mini_portile2 (~> 2.4.0)
|
|
209
|
-
octokit (4.
|
|
213
|
+
octokit (4.18.0)
|
|
214
|
+
faraday (>= 0.9)
|
|
210
215
|
sawyer (~> 0.8.0, >= 0.5.3)
|
|
211
216
|
pathutil (0.16.2)
|
|
212
217
|
forwardable-extended (~> 2.6)
|
|
213
218
|
public_suffix (3.1.1)
|
|
214
|
-
rb-fsevent (0.10.
|
|
215
|
-
rb-inotify (0.10.
|
|
219
|
+
rb-fsevent (0.10.4)
|
|
220
|
+
rb-inotify (0.10.1)
|
|
216
221
|
ffi (~> 1.0)
|
|
217
|
-
|
|
218
|
-
|
|
222
|
+
rexml (3.2.4)
|
|
223
|
+
rouge (3.19.0)
|
|
224
|
+
ruby-enum (0.8.0)
|
|
219
225
|
i18n
|
|
220
|
-
rubyzip (2.
|
|
226
|
+
rubyzip (2.3.0)
|
|
221
227
|
safe_yaml (1.0.5)
|
|
222
228
|
sass (3.7.4)
|
|
223
229
|
sass-listen (~> 4.0.0)
|
|
@@ -227,15 +233,20 @@ GEM
|
|
|
227
233
|
sawyer (0.8.2)
|
|
228
234
|
addressable (>= 2.3.5)
|
|
229
235
|
faraday (> 0.8, < 2.0)
|
|
236
|
+
simpleidn (0.1.1)
|
|
237
|
+
unf (~> 0.1.4)
|
|
230
238
|
terminal-table (1.8.0)
|
|
231
239
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
|
232
240
|
thread_safe (0.3.6)
|
|
233
|
-
typhoeus (1.
|
|
241
|
+
typhoeus (1.4.0)
|
|
234
242
|
ethon (>= 0.9.0)
|
|
235
|
-
tzinfo (1.2.
|
|
243
|
+
tzinfo (1.2.7)
|
|
236
244
|
thread_safe (~> 0.1)
|
|
237
|
-
|
|
238
|
-
|
|
245
|
+
unf (0.1.4)
|
|
246
|
+
unf_ext
|
|
247
|
+
unf_ext (0.0.7.7)
|
|
248
|
+
unicode-display_width (1.7.0)
|
|
249
|
+
zeitwerk (2.4.0)
|
|
239
250
|
|
|
240
251
|
PLATFORMS
|
|
241
252
|
ruby
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
10
|
<div id="tidelift">
|
|
11
|
-
<a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=
|
|
11
|
+
<a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise" target="_blank">
|
|
12
12
|
<span class="cta">
|
|
13
13
|
Active Admin for enterprise available via Tidelift
|
|
14
14
|
</span>
|
data/docs/documentation.md
CHANGED
data/docs/index.html
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</h3>
|
|
51
51
|
|
|
52
52
|
<p>
|
|
53
|
-
Each resource that is registered
|
|
53
|
+
Each resource that is registered with Active Admin becomes available as <span class="caps">JSON</span>, <span class="caps">XML</span> and <span class="caps">CSV</span> download. Customize the output to meet your requirements.
|
|
54
54
|
</p>
|
|
55
55
|
</div>
|
|
56
56
|
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
</h2>
|
|
134
134
|
|
|
135
135
|
<p>
|
|
136
|
-
<a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=
|
|
136
|
+
<a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise">
|
|
137
137
|
Available as part of the Tidelift Subscription
|
|
138
138
|
</a>
|
|
139
139
|
</p>
|
|
@@ -150,11 +150,11 @@
|
|
|
150
150
|
</p>
|
|
151
151
|
|
|
152
152
|
<div class="tidelift-buttons">
|
|
153
|
-
<a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral" target="_blank">
|
|
153
|
+
<a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise" target="_blank">
|
|
154
154
|
<span>LEARN MORE</span>
|
|
155
155
|
</a>
|
|
156
156
|
|
|
157
|
-
<a href="https://tidelift.com/subscription/request-a-demo?utm_source=rubygems-activeadmin&utm_medium=referral" target="_blank">
|
|
157
|
+
<a href="https://tidelift.com/subscription/request-a-demo?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise" target="_blank">
|
|
158
158
|
<span>REQUEST A DEMO</span>
|
|
159
159
|
</a>
|
|
160
160
|
</div>
|
|
@@ -202,11 +202,11 @@
|
|
|
202
202
|
</p>
|
|
203
203
|
|
|
204
204
|
<div class="tidelift-buttons">
|
|
205
|
-
<a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral" target="_blank">
|
|
205
|
+
<a href="https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise" target="_blank">
|
|
206
206
|
<span>LEARN MORE</span>
|
|
207
207
|
</a>
|
|
208
208
|
|
|
209
|
-
<a href="https://tidelift.com/subscription/request-a-demo?utm_source=rubygems-activeadmin&utm_medium=referral" target="_blank">
|
|
209
|
+
<a href="https://tidelift.com/subscription/request-a-demo?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise" target="_blank">
|
|
210
210
|
<span>REQUEST A DEMO</span>
|
|
211
211
|
</a>
|
|
212
212
|
</div>
|
|
@@ -46,7 +46,7 @@ module ActiveAdmin
|
|
|
46
46
|
|
|
47
47
|
# Event that gets triggered on load of Active Admin
|
|
48
48
|
BeforeLoadEvent = 'active_admin.application.before_load'.freeze
|
|
49
|
-
AfterLoadEvent
|
|
49
|
+
AfterLoadEvent = 'active_admin.application.after_load'.freeze
|
|
50
50
|
|
|
51
51
|
# Runs before the app's AA initializer
|
|
52
52
|
def setup!
|
|
@@ -112,9 +112,9 @@ module ActiveAdmin
|
|
|
112
112
|
def load!
|
|
113
113
|
unless loaded?
|
|
114
114
|
ActiveSupport::Notifications.publish BeforeLoadEvent, self # before_load hook
|
|
115
|
-
files.each { |file| load file }
|
|
116
|
-
namespace(default_namespace)
|
|
117
|
-
ActiveSupport::Notifications.publish AfterLoadEvent, self
|
|
115
|
+
files.each { |file| load file } # load files
|
|
116
|
+
namespace(default_namespace) # init AA resources
|
|
117
|
+
ActiveSupport::Notifications.publish AfterLoadEvent, self # after_load hook
|
|
118
118
|
@@loaded = true
|
|
119
119
|
end
|
|
120
120
|
end
|
|
@@ -125,7 +125,7 @@ module ActiveAdmin
|
|
|
125
125
|
|
|
126
126
|
# Returns ALL the files to be loaded
|
|
127
127
|
def files
|
|
128
|
-
load_paths.flatten.compact.uniq.flat_map { |path| Dir["#{path}/**/*.rb"] }
|
|
128
|
+
load_paths.flatten.compact.uniq.flat_map { |path| Dir["#{path}/**/*.rb"] }.sort
|
|
129
129
|
end
|
|
130
130
|
|
|
131
131
|
# Creates all the necessary routes for the ActiveAdmin configurations
|
|
@@ -176,7 +176,7 @@ module ActiveAdmin
|
|
|
176
176
|
# files from being loaded twice in production.
|
|
177
177
|
def remove_active_admin_load_paths_from_rails_autoload_and_eager_load
|
|
178
178
|
ActiveSupport::Dependencies.autoload_paths -= load_paths
|
|
179
|
-
Rails.application.config.eager_load_paths
|
|
179
|
+
Rails.application.config.eager_load_paths -= load_paths
|
|
180
180
|
end
|
|
181
181
|
|
|
182
182
|
# Hook into the Rails code reloading mechanism so that things are reloaded
|
|
@@ -4,12 +4,12 @@ module ActiveAdmin
|
|
|
4
4
|
extend ActiveSupport::Concern
|
|
5
5
|
|
|
6
6
|
ACTIONS_DICTIONARY = {
|
|
7
|
-
index:
|
|
8
|
-
show:
|
|
9
|
-
new:
|
|
10
|
-
create:
|
|
11
|
-
edit:
|
|
12
|
-
update:
|
|
7
|
+
index: ActiveAdmin::Authorization::READ,
|
|
8
|
+
show: ActiveAdmin::Authorization::READ,
|
|
9
|
+
new: ActiveAdmin::Authorization::CREATE,
|
|
10
|
+
create: ActiveAdmin::Authorization::CREATE,
|
|
11
|
+
edit: ActiveAdmin::Authorization::UPDATE,
|
|
12
|
+
update: ActiveAdmin::Authorization::UPDATE,
|
|
13
13
|
destroy: ActiveAdmin::Authorization::DESTROY
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -112,9 +112,9 @@ module ActiveAdmin
|
|
|
112
112
|
redirect_backwards_or_to_root
|
|
113
113
|
end
|
|
114
114
|
|
|
115
|
-
format.csv
|
|
116
|
-
format.json { render json: { error: error },
|
|
117
|
-
format.xml
|
|
115
|
+
format.csv { render body: error, status: :unauthorized }
|
|
116
|
+
format.json { render json: { error: error }, status: :unauthorized }
|
|
117
|
+
format.xml { render xml: "<error>#{error}</error>", status: :unauthorized }
|
|
118
118
|
end
|
|
119
119
|
end
|
|
120
120
|
|
|
@@ -5,10 +5,10 @@ module ActiveAdmin
|
|
|
5
5
|
# Controller action that is called when submitting the batch action form
|
|
6
6
|
def batch_action
|
|
7
7
|
if action_present?
|
|
8
|
-
selection
|
|
9
|
-
inputs
|
|
8
|
+
selection = params[:collection_selection] || []
|
|
9
|
+
inputs = JSON.parse params[:batch_action_inputs] || '{}'
|
|
10
10
|
valid_keys = MethodOrProcHelper.render_in_context(self, current_batch_action.inputs).try(:keys)
|
|
11
|
-
inputs
|
|
11
|
+
inputs = inputs.with_indifferent_access.slice *valid_keys
|
|
12
12
|
instance_exec selection, inputs, ¤t_batch_action.block
|
|
13
13
|
else
|
|
14
14
|
raise "Couldn't find batch action \"#{params[:batch_action]}\""
|
|
@@ -16,7 +16,7 @@ module ActiveAdmin
|
|
|
16
16
|
# batch_action => name of the specific action called
|
|
17
17
|
# batch_action_inputs => a JSON string of any requested confirmation values
|
|
18
18
|
text_node form_tag active_admin_config.route_batch_action_path(params, url_options), id: options[:id]
|
|
19
|
-
input name: :batch_action,
|
|
19
|
+
input name: :batch_action, id: :batch_action, type: :hidden
|
|
20
20
|
input name: :batch_action_inputs, id: :batch_action_inputs, type: :hidden
|
|
21
21
|
|
|
22
22
|
super(options)
|