activeadmin 2.8.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of activeadmin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +44 -0
- data/CONTRIBUTING.md +6 -6
- data/README.md +3 -3
- data/app/assets/javascripts/active_admin/base.js +1 -1
- data/app/views/active_admin/devise/mailer/reset_password_instructions.html.erb +1 -1
- data/app/views/active_admin/devise/mailer/unlock_instructions.html.erb +2 -2
- data/docs/5-forms.md +6 -1
- data/docs/6-show-pages.md +12 -0
- data/docs/Gemfile +2 -2
- data/docs/Gemfile.lock +23 -22
- data/lib/active_admin/application.rb +8 -8
- data/lib/active_admin/application_settings.rb +3 -3
- data/lib/active_admin/base_controller/authorization.rb +4 -3
- data/lib/active_admin/base_controller.rb +4 -4
- data/lib/active_admin/batch_actions/controller.rb +1 -1
- data/lib/active_admin/batch_actions/resource_extension.rb +9 -8
- data/lib/active_admin/batch_actions/views/batch_action_form.rb +2 -2
- data/lib/active_admin/batch_actions/views/batch_action_selector.rb +1 -1
- data/lib/active_admin/batch_actions/views/selection_cells.rb +3 -3
- data/lib/active_admin/cancan_adapter.rb +1 -1
- data/lib/active_admin/dependency.rb +4 -4
- data/lib/active_admin/devise.rb +5 -5
- data/lib/active_admin/dsl.rb +1 -1
- data/lib/active_admin/dynamic_settings_node.rb +2 -2
- data/lib/active_admin/engine.rb +10 -8
- data/lib/active_admin/error.rb +0 -2
- data/lib/active_admin/filters/active.rb +1 -1
- data/lib/active_admin/filters/active_filter.rb +5 -6
- data/lib/active_admin/filters/active_sidebar.rb +5 -5
- data/lib/active_admin/filters/forms.rb +3 -3
- data/lib/active_admin/filters/formtastic_addons.rb +1 -6
- data/lib/active_admin/filters.rb +6 -6
- data/lib/active_admin/form_builder.rb +21 -17
- data/lib/active_admin/generators/boilerplate.rb +1 -1
- data/lib/active_admin/inputs/datepicker_input.rb +1 -1
- data/lib/active_admin/inputs/filters/base/search_method_select.rb +2 -2
- data/lib/active_admin/inputs/filters/base.rb +1 -1
- data/lib/active_admin/inputs/filters/boolean_input.rb +1 -1
- data/lib/active_admin/inputs/filters/check_boxes_input.rb +1 -1
- data/lib/active_admin/inputs/filters/select_input.rb +2 -2
- data/lib/active_admin/localizers/resource_localizer.rb +3 -3
- data/lib/active_admin/localizers.rb +1 -1
- data/lib/active_admin/menu.rb +1 -1
- data/lib/active_admin/menu_item.rb +1 -1
- data/lib/active_admin/namespace.rb +7 -7
- data/lib/active_admin/namespace_settings.rb +5 -5
- data/lib/active_admin/order_clause.rb +1 -1
- data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +17 -17
- data/lib/active_admin/orm/active_record/comments/views.rb +2 -2
- data/lib/active_admin/orm/active_record/comments.rb +13 -13
- data/lib/active_admin/orm/active_record.rb +1 -1
- data/lib/active_admin/page.rb +1 -1
- data/lib/active_admin/pundit_adapter.rb +1 -1
- data/lib/active_admin/resource/action_items.rb +4 -4
- data/lib/active_admin/resource/attributes.rb +1 -1
- data/lib/active_admin/resource/belongs_to.rb +2 -2
- data/lib/active_admin/resource/controllers.rb +1 -1
- data/lib/active_admin/resource/naming.rb +2 -2
- data/lib/active_admin/resource/routes.rb +1 -3
- data/lib/active_admin/resource/sidebars.rb +1 -1
- data/lib/active_admin/resource.rb +17 -17
- data/lib/active_admin/resource_controller/decorators.rb +1 -3
- data/lib/active_admin/resource_controller/streaming.rb +7 -6
- data/lib/active_admin/resource_controller.rb +9 -9
- data/lib/active_admin/scope.rb +1 -1
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/view_factory.rb +1 -1
- data/lib/active_admin/view_helpers/breadcrumb_helper.rb +2 -2
- data/lib/active_admin/view_helpers/display_helper.rb +2 -2
- data/lib/active_admin/view_helpers/download_format_links_helper.rb +1 -1
- data/lib/active_admin/view_helpers/fields_for.rb +1 -1
- data/lib/active_admin/view_helpers.rb +1 -1
- data/lib/active_admin/views/components/active_admin_form.rb +5 -5
- data/lib/active_admin/views/components/attributes_table.rb +3 -3
- data/lib/active_admin/views/components/blank_slate.rb +1 -1
- data/lib/active_admin/views/components/dropdown_menu.rb +6 -6
- data/lib/active_admin/views/components/index_list.rb +2 -2
- data/lib/active_admin/views/components/menu.rb +1 -1
- data/lib/active_admin/views/components/menu_item.rb +3 -3
- data/lib/active_admin/views/components/paginated_collection.rb +6 -6
- data/lib/active_admin/views/components/panel.rb +1 -1
- data/lib/active_admin/views/components/scopes.rb +5 -5
- data/lib/active_admin/views/components/site_title.rb +1 -1
- data/lib/active_admin/views/components/status_tag.rb +11 -11
- data/lib/active_admin/views/components/table_for.rb +7 -7
- data/lib/active_admin/views/components/tabs.rb +2 -2
- data/lib/active_admin/views/footer.rb +2 -1
- data/lib/active_admin/views/header.rb +2 -2
- data/lib/active_admin/views/index_as_blog.rb +1 -1
- data/lib/active_admin/views/index_as_grid.rb +1 -1
- data/lib/active_admin/views/index_as_table.rb +11 -11
- data/lib/active_admin/views/pages/base.rb +6 -6
- data/lib/active_admin/views/pages/index.rb +10 -9
- data/lib/active_admin/views/tabbed_navigation.rb +2 -2
- data/lib/active_admin/views/title_bar.rb +1 -1
- data/lib/active_admin/views.rb +1 -1
- data/lib/active_admin.rb +55 -56
- data/lib/activeadmin.rb +1 -1
- data/lib/generators/active_admin/assets/assets_generator.rb +2 -2
- data/lib/generators/active_admin/devise/devise_generator.rb +1 -1
- data/lib/generators/active_admin/install/install_generator.rb +7 -7
- data/lib/generators/active_admin/page/page_generator.rb +1 -1
- data/lib/generators/active_admin/resource/resource_generator.rb +2 -2
- data/lib/generators/active_admin/webpacker/webpacker_generator.rb +7 -7
- data/lib/ransack_ext.rb +8 -8
- metadata +5 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a79fadc45ea60de060d130d9ce18ca04b0becd14baae2e46b3749b76cb7bd20
|
4
|
+
data.tar.gz: 59ecfb3dba085bd66b2534991dcba8e14dae2f76a07baae37f8b8daaa4063917
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d26b7fb0ffbd1da98ca7b4f685a7c386dcab3f25079f5e16e7926cb1c9ce2060db7ecc27d158608091a178590c9604b33850d5f44009401bee467c6f84811a0
|
7
|
+
data.tar.gz: 1273181e98620f7af30434e4fb669d95eddfa7633d3e5fb5b51fbb31bf8d8b7615e07c413590cba13b86b5fc1e087dc589f7f4f227c6ff62c4ea25925faf07f8
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,35 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## 2.9.0 [☰](https://github.com/activeadmin/activeadmin/compare/v2.8.1..v2.9.0)
|
6
|
+
|
7
|
+
### Enhancements
|
8
|
+
|
9
|
+
* Support for Rails 6.1. [#6548] by [@deivid-rodriguez]
|
10
|
+
* Add ability to override "Remove" button text on has_many forms. [#6523] by [@littleforest]
|
11
|
+
* Drop git in gemspec. [#6462] by [@utkarsh2102]
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* Pick up upstream fixes in devise templates. [#6536] by [@munen]
|
16
|
+
|
17
|
+
### Documentation
|
18
|
+
|
19
|
+
* Fix `has_many` syntax in forms documentation. [#6583] by [@krzcho]
|
20
|
+
* Add example of using `default_main_content` in show pages. [#6487] by [@sjieg]
|
21
|
+
|
22
|
+
### Dependency Changes
|
23
|
+
|
24
|
+
* Remove sassc and sprockets runtime dependencies. [#6584] by [@deivid-rodriguez]
|
25
|
+
|
26
|
+
## 2.8.1 [☰](https://github.com/activeadmin/activeadmin/compare/v2.8.0..v2.8.1)
|
27
|
+
|
28
|
+
### Bug Fixes
|
29
|
+
|
30
|
+
* Fix `permitted_param` generation for `belongs_to` when `:param` is used. [#6460] by [@deivid-rodriguez]
|
31
|
+
* Fix streaming CSV export. [#6451] by [@deivid-rodriguez]
|
32
|
+
* Fix input string filter no rendering dropdown input when its column name ends with a ransack predicate. [#6422] by [@Fivell]
|
33
|
+
|
5
34
|
## 2.8.0 [☰](https://github.com/activeadmin/activeadmin/compare/v2.7.0..v2.8.0)
|
6
35
|
|
7
36
|
### Enhancements
|
@@ -611,6 +640,16 @@ Please check [0-6-stable] for previous changes.
|
|
611
640
|
[#6341]: https://github.com/activeadmin/activeadmin/pull/6341
|
612
641
|
[#6368]: https://github.com/activeadmin/activeadmin/pull/6368
|
613
642
|
[#6393]: https://github.com/activeadmin/activeadmin/pull/6393
|
643
|
+
[#6422]: https://github.com/activeadmin/activeadmin/pull/6422
|
644
|
+
[#6451]: https://github.com/activeadmin/activeadmin/pull/6451
|
645
|
+
[#6460]: https://github.com/activeadmin/activeadmin/pull/6460
|
646
|
+
[#6462]: https://github.com/activeadmin/activeadmin/pull/6462
|
647
|
+
[#6487]: https://github.com/activeadmin/activeadmin/pull/6487
|
648
|
+
[#6523]: https://github.com/activeadmin/activeadmin/pull/6523
|
649
|
+
[#6536]: https://github.com/activeadmin/activeadmin/pull/6536
|
650
|
+
[#6548]: https://github.com/activeadmin/activeadmin/pull/6548
|
651
|
+
[#6583]: https://github.com/activeadmin/activeadmin/pull/6583
|
652
|
+
[#6584]: https://github.com/activeadmin/activeadmin/pull/6584
|
614
653
|
|
615
654
|
[@5t111111]: https://github.com/5t111111
|
616
655
|
[@aarek]: https://github.com/aarek
|
@@ -666,8 +705,10 @@ Please check [0-6-stable] for previous changes.
|
|
666
705
|
[@ko-lem]: https://github.com/ko-lem
|
667
706
|
[@kobeumut]: https://github.com/kobeumut
|
668
707
|
[@Kris-LIBIS]: https://github.com/Kris-LIBIS
|
708
|
+
[@krzcho]: https://github.com/krzcho
|
669
709
|
[@kwent]: https://github.com/kwent
|
670
710
|
[@leio10]: https://github.com/leio10
|
711
|
+
[@littleforest]: https://github.com/littleforest
|
671
712
|
[@Looooong]: https://github.com/Looooong
|
672
713
|
[@markstory]: https://github.com/markstory
|
673
714
|
[@mauriciopasquier]: https://github.com/mauriciopasquier
|
@@ -675,6 +716,7 @@ Please check [0-6-stable] for previous changes.
|
|
675
716
|
[@micred]: https://github.com/micred
|
676
717
|
[@mirelon]: https://github.com/mirelon
|
677
718
|
[@mshalaby]: https://github.com/mshalaby
|
719
|
+
[@munen]: https://github.com/munen
|
678
720
|
[@ndbroadbent]: https://github.com/ndbroadbent
|
679
721
|
[@Nguyenanh]: https://github.com/Nguyenanh
|
680
722
|
[@orkhan]: https://github.com/orkhan
|
@@ -692,12 +734,14 @@ Please check [0-6-stable] for previous changes.
|
|
692
734
|
[@ShallmentMo]: https://github.com/ShallmentMo
|
693
735
|
[@shekibobo]: https://github.com/shekibobo
|
694
736
|
[@shouya]: https://github.com/shouya
|
737
|
+
[@sjieg]: https://github.com/sjieg
|
695
738
|
[@stefsava]: https://github.com/stefsava
|
696
739
|
[@stereoscott]: https://github.com/stereoscott
|
697
740
|
[@taralbass]: https://github.com/taralbass
|
698
741
|
[@tiagotex]: https://github.com/tiagotex
|
699
742
|
[@timoschilling]: https://github.com/timoschilling
|
700
743
|
[@TimPetricola]: https://github.com/TimPetricola
|
744
|
+
[@utkarsh2102]: https://github.com/utkarsh2102
|
701
745
|
[@varyonic]: https://github.com/varyonic
|
702
746
|
[@vcsjones]: https://github.com/vcsjones
|
703
747
|
[@vfonic]: https://github.com/vfonic
|
data/CONTRIBUTING.md
CHANGED
@@ -136,12 +136,12 @@ git push --set-upstream origin 325-add-japanese-translations
|
|
136
136
|
|
137
137
|
Finally, go to GitHub and [make a Pull Request][] :D
|
138
138
|
|
139
|
-
|
140
|
-
about quality, so your PR won't be merged until all tests pass. It's
|
141
|
-
but it's possible that your changes pass tests in one Rails version
|
142
|
-
another. In that case, you'll have to setup your development
|
143
|
-
explained in step 3) to use the problematic Rails version, and
|
144
|
-
what's going on!
|
139
|
+
Github Actions will run our test suite against all supported Rails versions. We
|
140
|
+
care about quality, so your PR won't be merged until all tests pass. It's
|
141
|
+
unlikely, but it's possible that your changes pass tests in one Rails version
|
142
|
+
but fail in another. In that case, you'll have to setup your development
|
143
|
+
environment (as explained in step 3) to use the problematic Rails version, and
|
144
|
+
investigate what's going on!
|
145
145
|
|
146
146
|
### Keeping your Pull Request updated
|
147
147
|
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
creating elegant backends for website administration.
|
5
5
|
|
6
6
|
[![Version ][rubygems_badge]][rubygems]
|
7
|
-
[![
|
7
|
+
[![Github Actions ][actions_badge]][actions]
|
8
8
|
[![Coverage ][coverage_badge]][coverage]
|
9
9
|
[![Tidelift ][tidelift_badge]][tidelift]
|
10
10
|
[![Inch CI ][inch_badge]][inch]
|
@@ -93,8 +93,8 @@ Thanks to [Open Collective][opencollective contributors] and all our Open Collec
|
|
93
93
|
|
94
94
|
[rubygems_badge]: http://img.shields.io/gem/v/activeadmin.svg
|
95
95
|
[rubygems]: https://rubygems.org/gems/activeadmin
|
96
|
-
[
|
97
|
-
[
|
96
|
+
[actions_badge]: https://github.com/activeadmin/activeadmin/workflows/ci/badge.svg
|
97
|
+
[actions]: https://github.com/activeadmin/activeadmin/actions
|
98
98
|
[coverage_badge]: https://api.codeclimate.com/v1/badges/779e407d22bacff19733/test_coverage
|
99
99
|
[coverage]: https://codeclimate.com/github/activeadmin/activeadmin/test_coverage
|
100
100
|
[inch_badge]: http://inch-ci.org/github/activeadmin/activeadmin.svg?branch=master
|
@@ -11,7 +11,7 @@
|
|
11
11
|
//= require_self
|
12
12
|
|
13
13
|
(function(global, factory) {
|
14
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("jquery"), require("jquery-ui/ui/widgets/datepicker"), require("jquery-ui/ui/widgets/dialog"), require("jquery-ui/ui/widgets/sortable"), require("jquery-ui/ui/widgets/tabs"), require("jquery-ui/ui/widget"), require("jquery-ujs")) : typeof define === "function" && define.amd ? define([ "exports", "jquery", "jquery-ui/ui/widgets/datepicker", "jquery-ui/ui/widgets/dialog", "jquery-ui/ui/widgets/sortable", "jquery-ui/ui/widgets/tabs", "jquery-ui/ui/widget", "jquery-ujs" ], factory) : (global = global || self,
|
14
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("jquery"), require("jquery-ui/ui/widgets/datepicker"), require("jquery-ui/ui/widgets/dialog"), require("jquery-ui/ui/widgets/sortable"), require("jquery-ui/ui/widgets/tabs"), require("jquery-ui/ui/widget"), require("jquery-ujs")) : typeof define === "function" && define.amd ? define([ "exports", "jquery", "jquery-ui/ui/widgets/datepicker", "jquery-ui/ui/widgets/dialog", "jquery-ui/ui/widgets/sortable", "jquery-ui/ui/widgets/tabs", "jquery-ui/ui/widget", "jquery-ujs" ], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
|
15
15
|
factory(global.ActiveAdmin = {}));
|
16
16
|
})(this, function(exports) {
|
17
17
|
"use strict";
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
|
4
4
|
|
5
|
-
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @
|
5
|
+
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
|
6
6
|
|
7
7
|
<p>If you didn't request this, please ignore this email.</p>
|
8
8
|
<p>Your password won't change until you access the link above and create a new one.</p>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<p>Hello <%= @resource.email %>!</p>
|
2
2
|
|
3
|
-
<p>Your account has been locked due to an excessive
|
3
|
+
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
4
4
|
|
5
5
|
<p>Click the link below to unlock your account:</p>
|
6
6
|
|
7
|
-
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @
|
7
|
+
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
|
data/docs/5-forms.md
CHANGED
@@ -110,8 +110,9 @@ ActiveAdmin.register Post do
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
f.inputs do
|
113
|
-
f.has_many :
|
113
|
+
f.has_many :comments,
|
114
114
|
new_record: 'Leave Comment',
|
115
|
+
remove_record: 'Remove Comment',
|
115
116
|
allow_destroy: -> (c) { c.author?(current_admin_user) } do |b|
|
116
117
|
b.input :body
|
117
118
|
end
|
@@ -139,6 +140,10 @@ The `:new_record` option controls the visibility of the new record button (shown
|
|
139
140
|
by default). If you pass a string, it will be used as the text for the new
|
140
141
|
record button.
|
141
142
|
|
143
|
+
The `:remove_record` option controls the text of the remove button (shown after
|
144
|
+
the new record button is pressed). If you pass a string, it will be used as the
|
145
|
+
text for the remove button.
|
146
|
+
|
142
147
|
The `:sortable` option adds a hidden field and will enable drag & drop sorting
|
143
148
|
of the children. It expects the name of the column that will store the index of
|
144
149
|
each child.
|
data/docs/6-show-pages.md
CHANGED
@@ -79,3 +79,15 @@ ActiveAdmin.register Book do
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
```
|
82
|
+
|
83
|
+
If you want to keep the default show data, but add something extra to it:
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
show do
|
87
|
+
div do
|
88
|
+
h3 'Some custom charts about this object'
|
89
|
+
render partial: 'charts'
|
90
|
+
end
|
91
|
+
default_main_content
|
92
|
+
end
|
93
|
+
```
|
data/docs/Gemfile
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
|
-
gem
|
3
|
+
gem "github-pages"
|
data/docs/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
activesupport (6.0.3.
|
4
|
+
activesupport (6.0.3.3)
|
5
5
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
6
6
|
i18n (>= 0.7, < 2)
|
7
7
|
minitest (~> 5.1)
|
@@ -16,10 +16,10 @@ GEM
|
|
16
16
|
colorator (1.1.0)
|
17
17
|
commonmarker (0.17.13)
|
18
18
|
ruby-enum (~> 0.5)
|
19
|
-
concurrent-ruby (1.1.
|
19
|
+
concurrent-ruby (1.1.7)
|
20
20
|
dnsruby (1.61.4)
|
21
21
|
simpleidn (~> 0.1)
|
22
|
-
em-websocket (0.5.
|
22
|
+
em-websocket (0.5.2)
|
23
23
|
eventmachine (>= 0.12.9)
|
24
24
|
http_parser.rb (~> 0.6.0)
|
25
25
|
ethon (0.12.0)
|
@@ -31,23 +31,23 @@ GEM
|
|
31
31
|
ffi (1.13.1)
|
32
32
|
forwardable-extended (2.6.0)
|
33
33
|
gemoji (3.0.1)
|
34
|
-
github-pages (
|
34
|
+
github-pages (209)
|
35
35
|
github-pages-health-check (= 1.16.1)
|
36
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
|
-
jekyll-feed (= 0.
|
41
|
+
jekyll-feed (= 0.15.1)
|
42
42
|
jekyll-gist (= 1.5.0)
|
43
43
|
jekyll-github-metadata (= 2.13.0)
|
44
|
-
jekyll-mentions (= 1.
|
44
|
+
jekyll-mentions (= 1.6.0)
|
45
45
|
jekyll-optional-front-matter (= 0.3.2)
|
46
46
|
jekyll-paginate (= 1.1.0)
|
47
47
|
jekyll-readme-index (= 0.3.0)
|
48
|
-
jekyll-redirect-from (= 0.
|
48
|
+
jekyll-redirect-from (= 0.16.0)
|
49
49
|
jekyll-relative-links (= 0.6.1)
|
50
|
-
jekyll-remote-theme (= 0.4.
|
50
|
+
jekyll-remote-theme (= 0.4.2)
|
51
51
|
jekyll-sass-converter (= 1.5.2)
|
52
52
|
jekyll-seo-tag (= 2.6.1)
|
53
53
|
jekyll-sitemap (= 1.4.0)
|
@@ -55,7 +55,7 @@ GEM
|
|
55
55
|
jekyll-theme-architect (= 0.1.1)
|
56
56
|
jekyll-theme-cayman (= 0.1.1)
|
57
57
|
jekyll-theme-dinky (= 0.1.1)
|
58
|
-
jekyll-theme-hacker (= 0.1.
|
58
|
+
jekyll-theme-hacker (= 0.1.2)
|
59
59
|
jekyll-theme-leap-day (= 0.1.1)
|
60
60
|
jekyll-theme-merlot (= 0.1.1)
|
61
61
|
jekyll-theme-midnight (= 0.1.1)
|
@@ -66,14 +66,14 @@ GEM
|
|
66
66
|
jekyll-theme-tactile (= 0.1.1)
|
67
67
|
jekyll-theme-time-machine (= 0.1.1)
|
68
68
|
jekyll-titles-from-headings (= 0.5.3)
|
69
|
-
jemoji (= 0.
|
69
|
+
jemoji (= 0.12.0)
|
70
70
|
kramdown (= 2.3.0)
|
71
71
|
kramdown-parser-gfm (= 1.1.0)
|
72
72
|
liquid (= 4.0.3)
|
73
73
|
mercenary (~> 0.3)
|
74
74
|
minima (= 2.5.1)
|
75
75
|
nokogiri (>= 1.10.4, < 2.0)
|
76
|
-
rouge (= 3.
|
76
|
+
rouge (= 3.23.0)
|
77
77
|
terminal-table (~> 1.4)
|
78
78
|
github-pages-health-check (1.16.1)
|
79
79
|
addressable (~> 2.3)
|
@@ -81,7 +81,7 @@ GEM
|
|
81
81
|
octokit (~> 4.0)
|
82
82
|
public_suffix (~> 3.0)
|
83
83
|
typhoeus (~> 1.3)
|
84
|
-
html-pipeline (2.
|
84
|
+
html-pipeline (2.14.0)
|
85
85
|
activesupport (>= 2)
|
86
86
|
nokogiri (>= 1.4)
|
87
87
|
http_parser.rb (0.6.0)
|
@@ -114,14 +114,14 @@ GEM
|
|
114
114
|
rouge (>= 2.0, < 4.0)
|
115
115
|
jekyll-default-layout (0.1.4)
|
116
116
|
jekyll (~> 3.0)
|
117
|
-
jekyll-feed (0.
|
117
|
+
jekyll-feed (0.15.1)
|
118
118
|
jekyll (>= 3.7, < 5.0)
|
119
119
|
jekyll-gist (1.5.0)
|
120
120
|
octokit (~> 4.2)
|
121
121
|
jekyll-github-metadata (2.13.0)
|
122
122
|
jekyll (>= 3.4, < 5.0)
|
123
123
|
octokit (~> 4.0, != 4.4.0)
|
124
|
-
jekyll-mentions (1.
|
124
|
+
jekyll-mentions (1.6.0)
|
125
125
|
html-pipeline (~> 2.3)
|
126
126
|
jekyll (>= 3.7, < 5.0)
|
127
127
|
jekyll-optional-front-matter (0.3.2)
|
@@ -129,14 +129,15 @@ GEM
|
|
129
129
|
jekyll-paginate (1.1.0)
|
130
130
|
jekyll-readme-index (0.3.0)
|
131
131
|
jekyll (>= 3.0, < 5.0)
|
132
|
-
jekyll-redirect-from (0.
|
132
|
+
jekyll-redirect-from (0.16.0)
|
133
133
|
jekyll (>= 3.3, < 5.0)
|
134
134
|
jekyll-relative-links (0.6.1)
|
135
135
|
jekyll (>= 3.3, < 5.0)
|
136
|
-
jekyll-remote-theme (0.4.
|
136
|
+
jekyll-remote-theme (0.4.2)
|
137
137
|
addressable (~> 2.0)
|
138
138
|
jekyll (>= 3.5, < 5.0)
|
139
|
-
|
139
|
+
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
|
140
|
+
rubyzip (>= 1.3.0, < 3.0)
|
140
141
|
jekyll-sass-converter (1.5.2)
|
141
142
|
sass (~> 3.4)
|
142
143
|
jekyll-seo-tag (2.6.1)
|
@@ -153,8 +154,8 @@ GEM
|
|
153
154
|
jekyll-theme-dinky (0.1.1)
|
154
155
|
jekyll (~> 3.5)
|
155
156
|
jekyll-seo-tag (~> 2.0)
|
156
|
-
jekyll-theme-hacker (0.1.
|
157
|
-
jekyll (
|
157
|
+
jekyll-theme-hacker (0.1.2)
|
158
|
+
jekyll (> 3.5, < 5.0)
|
158
159
|
jekyll-seo-tag (~> 2.0)
|
159
160
|
jekyll-theme-leap-day (0.1.1)
|
160
161
|
jekyll (~> 3.5)
|
@@ -188,7 +189,7 @@ GEM
|
|
188
189
|
jekyll (>= 3.3, < 5.0)
|
189
190
|
jekyll-watch (2.2.1)
|
190
191
|
listen (~> 3.0)
|
191
|
-
jemoji (0.
|
192
|
+
jemoji (0.12.0)
|
192
193
|
gemoji (~> 3.0)
|
193
194
|
html-pipeline (~> 2.2)
|
194
195
|
jekyll (>= 3.0, < 5.0)
|
@@ -206,7 +207,7 @@ GEM
|
|
206
207
|
jekyll (>= 3.5, < 5.0)
|
207
208
|
jekyll-feed (~> 0.9)
|
208
209
|
jekyll-seo-tag (~> 2.1)
|
209
|
-
minitest (5.14.
|
210
|
+
minitest (5.14.2)
|
210
211
|
multipart-post (2.1.1)
|
211
212
|
nokogiri (1.10.10)
|
212
213
|
mini_portile2 (~> 2.4.0)
|
@@ -220,7 +221,7 @@ GEM
|
|
220
221
|
rb-inotify (0.10.1)
|
221
222
|
ffi (~> 1.0)
|
222
223
|
rexml (3.2.4)
|
223
|
-
rouge (3.
|
224
|
+
rouge (3.23.0)
|
224
225
|
ruby-enum (0.8.0)
|
225
226
|
i18n
|
226
227
|
rubyzip (2.3.0)
|
@@ -1,6 +1,6 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require "active_admin/router"
|
2
|
+
require "active_admin/application_settings"
|
3
|
+
require "active_admin/namespace_settings"
|
4
4
|
|
5
5
|
module ActiveAdmin
|
6
6
|
class Application
|
@@ -45,8 +45,8 @@ module ActiveAdmin
|
|
45
45
|
include AssetRegistration
|
46
46
|
|
47
47
|
# Event that gets triggered on load of Active Admin
|
48
|
-
BeforeLoadEvent =
|
49
|
-
AfterLoadEvent =
|
48
|
+
BeforeLoadEvent = "active_admin.application.before_load".freeze
|
49
|
+
AfterLoadEvent = "active_admin.application.after_load".freeze
|
50
50
|
|
51
51
|
# Runs before the app's AA initializer
|
52
52
|
def setup!
|
@@ -164,9 +164,9 @@ module ActiveAdmin
|
|
164
164
|
private
|
165
165
|
|
166
166
|
def register_default_assets
|
167
|
-
register_stylesheet
|
168
|
-
register_stylesheet
|
169
|
-
register_javascript
|
167
|
+
register_stylesheet "active_admin.css", media: "screen"
|
168
|
+
register_stylesheet "active_admin/print.css", media: "print"
|
169
|
+
register_javascript "active_admin.js"
|
170
170
|
end
|
171
171
|
|
172
172
|
# Since app/admin is alphabetically before app/models, we have to remove it
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "active_admin/settings_node"
|
2
2
|
|
3
3
|
module ActiveAdmin
|
4
4
|
class ApplicationSettings < SettingsNode
|
@@ -15,7 +15,7 @@ module ActiveAdmin
|
|
15
15
|
# Load paths for admin configurations. Add folders to this load path
|
16
16
|
# to load up other resources for administration. External gems can
|
17
17
|
# include their paths in this load path to provide active_admin UIs
|
18
|
-
register :load_paths, [File.expand_path(
|
18
|
+
register :load_paths, [File.expand_path("app/admin", Rails.root)]
|
19
19
|
|
20
20
|
# Set default localize format for Date/Time values
|
21
21
|
register :localize_format, :long
|
@@ -34,7 +34,7 @@ module ActiveAdmin
|
|
34
34
|
:to_s ]
|
35
35
|
|
36
36
|
# To make debugging easier, by default don't stream in development
|
37
|
-
register :disable_streaming_in, [
|
37
|
+
register :disable_streaming_in, ["development"]
|
38
38
|
|
39
39
|
# Remove sensitive attributes from being displayed, made editable, or exported by default
|
40
40
|
register :filter_attributes, [:encrypted_password, :password, :password_confirmation]
|
@@ -52,9 +52,10 @@ module ActiveAdmin
|
|
52
52
|
# an ActiveAdmin::AccessDenied.
|
53
53
|
def authorize!(action, subject = nil)
|
54
54
|
unless authorized? action, subject
|
55
|
-
raise ActiveAdmin::AccessDenied.new(
|
56
|
-
|
57
|
-
|
55
|
+
raise ActiveAdmin::AccessDenied.new(
|
56
|
+
current_active_admin_user,
|
57
|
+
action,
|
58
|
+
subject)
|
58
59
|
end
|
59
60
|
end
|
60
61
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "active_admin/base_controller/authorization"
|
2
|
+
require "active_admin/base_controller/menu"
|
3
3
|
|
4
4
|
module ActiveAdmin
|
5
5
|
# BaseController for ActiveAdmin.
|
@@ -69,11 +69,11 @@ module ActiveAdmin
|
|
69
69
|
# 2. If we're rendering a custom action, we'll use the active_admin layout so
|
70
70
|
# that users can render any template inside Active Admin.
|
71
71
|
def determine_active_admin_layout
|
72
|
-
ACTIVE_ADMIN_ACTIONS.include?(params[:action].to_sym) ? false :
|
72
|
+
ACTIVE_ADMIN_ACTIONS.include?(params[:action].to_sym) ? false : "active_admin"
|
73
73
|
end
|
74
74
|
|
75
75
|
def active_admin_root
|
76
|
-
controller, action = active_admin_namespace.root_to.split
|
76
|
+
controller, action = active_admin_namespace.root_to.split "#"
|
77
77
|
{ controller: controller, action: action }
|
78
78
|
end
|
79
79
|
|
@@ -6,7 +6,7 @@ module ActiveAdmin
|
|
6
6
|
def batch_action
|
7
7
|
if action_present?
|
8
8
|
selection = params[:collection_selection] || []
|
9
|
-
inputs = JSON.parse params[:batch_action_inputs] ||
|
9
|
+
inputs = JSON.parse params[:batch_action_inputs] || "{}"
|
10
10
|
valid_keys = MethodOrProcHelper.render_in_context(self, current_batch_action.inputs).try(:keys)
|
11
11
|
inputs = inputs.with_indifferent_access.slice *valid_keys
|
12
12
|
instance_exec selection, inputs, ¤t_batch_action.block
|
@@ -57,21 +57,22 @@ module ActiveAdmin
|
|
57
57
|
def add_default_batch_action
|
58
58
|
destroy_options = {
|
59
59
|
priority: 100,
|
60
|
-
confirm: proc { I18n.t(
|
61
|
-
if: proc { controller.action_methods.include?(
|
60
|
+
confirm: proc { I18n.t("active_admin.batch_actions.delete_confirmation", plural_model: active_admin_config.plural_resource_label.downcase) },
|
61
|
+
if: proc { controller.action_methods.include?("destroy") && authorized?(ActiveAdmin::Auth::DESTROY, active_admin_config.resource_class) }
|
62
62
|
}
|
63
63
|
|
64
|
-
add_batch_action :destroy, proc { I18n.t(
|
64
|
+
add_batch_action :destroy, proc { I18n.t("active_admin.delete") }, destroy_options do |selected_ids|
|
65
65
|
batch_action_collection.find(selected_ids).each do |record|
|
66
66
|
authorize! ActiveAdmin::Auth::DESTROY, record
|
67
67
|
destroy_resource(record)
|
68
68
|
end
|
69
69
|
|
70
70
|
redirect_to active_admin_config.route_collection_path(params),
|
71
|
-
notice: I18n.t(
|
72
|
-
|
73
|
-
|
74
|
-
|
71
|
+
notice: I18n.t(
|
72
|
+
"active_admin.batch_actions.succesfully_destroyed",
|
73
|
+
count: selected_ids.count,
|
74
|
+
model: active_admin_config.resource_label.downcase,
|
75
|
+
plural_model: active_admin_config.plural_resource_label(count: selected_ids.count).downcase)
|
75
76
|
end
|
76
77
|
end
|
77
78
|
|
@@ -84,7 +85,7 @@ module ActiveAdmin
|
|
84
85
|
|
85
86
|
attr_reader :block, :title, :sym
|
86
87
|
|
87
|
-
DEFAULT_CONFIRM_MESSAGE = proc { I18n.t
|
88
|
+
DEFAULT_CONFIRM_MESSAGE = proc { I18n.t "active_admin.batch_actions.default_confirmation" }
|
88
89
|
|
89
90
|
# Create a Batch Action
|
90
91
|
#
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "active_admin/component"
|
2
2
|
|
3
3
|
module ActiveAdmin
|
4
4
|
module BatchActions
|
@@ -30,7 +30,7 @@ module ActiveAdmin
|
|
30
30
|
private
|
31
31
|
|
32
32
|
def closing_form_tag
|
33
|
-
|
33
|
+
"</form>".html_safe
|
34
34
|
end
|
35
35
|
|
36
36
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "active_admin/component"
|
2
2
|
|
3
3
|
module ActiveAdmin
|
4
4
|
module BatchActions
|
@@ -7,7 +7,7 @@ module ActiveAdmin
|
|
7
7
|
class ResourceSelectionToggleCell < ActiveAdmin::Component
|
8
8
|
builder_method :resource_selection_toggle_cell
|
9
9
|
|
10
|
-
def build(label_text =
|
10
|
+
def build(label_text = "")
|
11
11
|
label do
|
12
12
|
input type: "checkbox", id: "collection_selection_toggle_all", name: "collection_selection_toggle_all", class: "toggle_all"
|
13
13
|
text_node label_text if label_text.present?
|
@@ -30,7 +30,7 @@ module ActiveAdmin
|
|
30
30
|
|
31
31
|
def build
|
32
32
|
super(id: "collection_selection_toggle_panel")
|
33
|
-
resource_selection_toggle_cell(I18n.t(
|
33
|
+
resource_selection_toggle_cell(I18n.t("active_admin.batch_actions.selection_toggle_explanation", default: "(Toggle Selection)"))
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
@@ -2,7 +2,7 @@ unless ActiveAdmin::Dependency.cancan? || ActiveAdmin::Dependency.cancancan?
|
|
2
2
|
ActiveAdmin::Dependency.cancan!
|
3
3
|
end
|
4
4
|
|
5
|
-
require
|
5
|
+
require "cancan"
|
6
6
|
|
7
7
|
# Add a setting to the application to configure the ability
|
8
8
|
ActiveAdmin::Application.inheritable_setting :cancan_ability_class, "Ability"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module ActiveAdmin
|
2
2
|
module Dependency
|
3
3
|
module Requirements
|
4
|
-
DEVISE =
|
4
|
+
DEVISE = ">= 4.0", "< 5"
|
5
5
|
end
|
6
6
|
|
7
7
|
# Provides a clean interface to check for gem dependencies at runtime.
|
@@ -42,9 +42,9 @@ module ActiveAdmin
|
|
42
42
|
# => false
|
43
43
|
#
|
44
44
|
def self.method_missing(name, *args)
|
45
|
-
if name[-1] ==
|
45
|
+
if name[-1] == "?"
|
46
46
|
Matcher.new(name[0..-2]).match? args
|
47
|
-
elsif name[-1] ==
|
47
|
+
elsif name[-1] == "!"
|
48
48
|
Matcher.new(name[0..-2]).match! args
|
49
49
|
else
|
50
50
|
Matcher.new name.to_s
|
@@ -91,7 +91,7 @@ module ActiveAdmin
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def inspect
|
94
|
-
info = spec ? "#{spec.name} #{spec.version}" :
|
94
|
+
info = spec ? "#{spec.name} #{spec.version}" : "(missing)"
|
95
95
|
"<ActiveAdmin::Dependency::Matcher for #{info}>"
|
96
96
|
end
|
97
97
|
end
|
data/lib/active_admin/devise.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
ActiveAdmin::Dependency.devise! ActiveAdmin::Dependency::Requirements::DEVISE
|
2
2
|
|
3
|
-
require
|
3
|
+
require "devise"
|
4
4
|
|
5
5
|
module ActiveAdmin
|
6
6
|
module Devise
|
@@ -9,7 +9,7 @@ module ActiveAdmin
|
|
9
9
|
{
|
10
10
|
path: ActiveAdmin.application.default_namespace || "/",
|
11
11
|
controllers: ActiveAdmin::Devise.controllers,
|
12
|
-
path_names: { sign_in:
|
12
|
+
path_names: { sign_in: "login", sign_out: "logout" },
|
13
13
|
sign_out_via: [*::Devise.sign_out_via, ActiveAdmin.application.logout_link_method].uniq
|
14
14
|
}
|
15
15
|
end
|
@@ -27,14 +27,14 @@ module ActiveAdmin
|
|
27
27
|
module Controller
|
28
28
|
extend ::ActiveSupport::Concern
|
29
29
|
included do
|
30
|
-
layout
|
30
|
+
layout "active_admin_logged_out"
|
31
31
|
helper ::ActiveAdmin::ViewHelpers
|
32
32
|
end
|
33
33
|
|
34
34
|
# Redirect to the default namespace on logout
|
35
35
|
def root_path
|
36
36
|
namespace = ActiveAdmin.application.default_namespace.presence
|
37
|
-
root_path_method = [namespace, :root_path].compact.join(
|
37
|
+
root_path_method = [namespace, :root_path].compact.join("_")
|
38
38
|
|
39
39
|
path = if Helpers::Routes.respond_to? root_path_method
|
40
40
|
Helpers::Routes.send root_path_method
|
@@ -45,7 +45,7 @@ module ActiveAdmin
|
|
45
45
|
|
46
46
|
# NOTE: `relative_url_root` is deprecated by Rails.
|
47
47
|
# Remove prefix here if it is removed completely.
|
48
|
-
prefix = Rails.configuration.action_controller[:relative_url_root] ||
|
48
|
+
prefix = Rails.configuration.action_controller[:relative_url_root] || ""
|
49
49
|
prefix + path
|
50
50
|
end
|
51
51
|
end
|