activeadmin 2.7.0 → 2.8.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.

Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +54 -8
  3. data/CONTRIBUTING.md +1 -17
  4. data/app/assets/javascripts/active_admin/base.js +13 -15
  5. data/app/assets/stylesheets/active_admin/components/_comments.scss +2 -2
  6. data/app/javascript/active_admin/initializers/per-page.js +1 -1
  7. data/app/javascript/active_admin/lib/checkbox-toggler.js +3 -3
  8. data/app/javascript/active_admin/lib/dropdown-menu.js +1 -1
  9. data/app/javascript/active_admin/lib/modal-dialog.js +7 -7
  10. data/app/javascript/active_admin/lib/per-page.js +1 -1
  11. data/app/javascript/active_admin/lib/table-checkbox-toggler.js +1 -1
  12. data/app/views/layouts/active_admin_logged_out.html.erb +2 -2
  13. data/config/locales/ar.yml +6 -6
  14. data/config/locales/es-MX.yml +2 -1
  15. data/config/locales/es.yml +2 -2
  16. data/config/locales/it.yml +18 -0
  17. data/config/locales/ja.yml +3 -3
  18. data/docs/11-decorators.md +16 -5
  19. data/docs/Gemfile.lock +36 -26
  20. data/lib/active_admin.rb +43 -43
  21. data/lib/active_admin/application.rb +6 -6
  22. data/lib/active_admin/authorization_adapter.rb +3 -3
  23. data/lib/active_admin/base_controller/authorization.rb +9 -9
  24. data/lib/active_admin/batch_actions/controller.rb +3 -3
  25. data/lib/active_admin/batch_actions/views/batch_action_form.rb +1 -1
  26. data/lib/active_admin/batch_actions/views/batch_action_selector.rb +5 -5
  27. data/lib/active_admin/collection_decorator.rb +31 -0
  28. data/lib/active_admin/csv_builder.rb +4 -4
  29. data/lib/active_admin/dependency.rb +7 -7
  30. data/lib/active_admin/filters.rb +1 -1
  31. data/lib/active_admin/filters/forms.rb +3 -3
  32. data/lib/active_admin/filters/resource_extension.rb +1 -1
  33. data/lib/active_admin/form_builder.rb +5 -5
  34. data/lib/active_admin/helpers/optional_display.rb +2 -2
  35. data/lib/active_admin/inputs/filters/base/search_method_select.rb +2 -2
  36. data/lib/active_admin/menu_item.rb +7 -7
  37. data/lib/active_admin/namespace.rb +7 -7
  38. data/lib/active_admin/orm/active_record/comments.rb +11 -11
  39. data/lib/active_admin/orm/active_record/comments/comment.rb +3 -3
  40. data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +3 -3
  41. data/lib/active_admin/pundit_adapter.rb +4 -4
  42. data/lib/active_admin/resource/action_items.rb +1 -1
  43. data/lib/active_admin/resource/menu.rb +4 -4
  44. data/lib/active_admin/resource/naming.rb +3 -3
  45. data/lib/active_admin/resource/routes.rb +5 -5
  46. data/lib/active_admin/resource/scope_to.rb +7 -7
  47. data/lib/active_admin/resource_controller.rb +4 -3
  48. data/lib/active_admin/resource_controller/data_access.rb +1 -1
  49. data/lib/active_admin/resource_controller/decorators.rb +5 -25
  50. data/lib/active_admin/resource_dsl.rb +5 -5
  51. data/lib/active_admin/scope.rb +5 -5
  52. data/lib/active_admin/version.rb +1 -1
  53. data/lib/active_admin/view_factory.rb +16 -16
  54. data/lib/active_admin/view_helpers/breadcrumb_helper.rb +1 -1
  55. data/lib/active_admin/view_helpers/display_helper.rb +3 -3
  56. data/lib/active_admin/view_helpers/fields_for.rb +1 -1
  57. data/lib/active_admin/views/components/attributes_table.rb +2 -2
  58. data/lib/active_admin/views/components/dropdown_menu.rb +2 -2
  59. data/lib/active_admin/views/components/index_list.rb +1 -1
  60. data/lib/active_admin/views/components/menu_item.rb +1 -1
  61. data/lib/active_admin/views/components/paginated_collection.rb +14 -14
  62. data/lib/active_admin/views/components/table_for.rb +10 -10
  63. data/lib/active_admin/views/components/tabs.rb +1 -1
  64. data/lib/active_admin/views/index_as_table.rb +6 -6
  65. data/lib/active_admin/views/pages/base.rb +1 -1
  66. data/lib/active_admin/views/pages/index.rb +8 -8
  67. data/lib/generators/active_admin/assets/templates/active_admin.scss +2 -2
  68. data/lib/generators/active_admin/devise/devise_generator.rb +4 -4
  69. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +2 -2
  70. data/lib/generators/active_admin/resource/resource_generator.rb +1 -1
  71. data/lib/generators/active_admin/webpacker/templates/active_admin.scss +2 -2
  72. metadata +15 -8
@@ -29,7 +29,7 @@ module ActiveAdmin
29
29
  text_node(active_admin_namespace.head)
30
30
 
31
31
  active_admin_application.stylesheets.each do |style, options|
32
- stylesheet_tag = active_admin_namespace.use_webpacker ? stylesheet_pack_tag(style, options) : stylesheet_link_tag(style, options)
32
+ stylesheet_tag = active_admin_namespace.use_webpacker ? stylesheet_pack_tag(style, **options) : stylesheet_link_tag(style, **options)
33
33
  text_node(stylesheet_tag.html_safe) if stylesheet_tag
34
34
  end
35
35
 
@@ -125,16 +125,16 @@ module ActiveAdmin
125
125
  def render_index
126
126
  renderer_class = find_index_renderer_class(config[:as])
127
127
 
128
- paginator = config.fetch(:paginator, true)
129
- download_links = config.fetch(:download_links, active_admin_config.namespace.download_links)
128
+ paginator = config.fetch(:paginator, true)
129
+ download_links = config.fetch(:download_links, active_admin_config.namespace.download_links)
130
130
  pagination_total = config.fetch(:pagination_total, true)
131
- per_page = config.fetch(:per_page, active_admin_config.per_page)
131
+ per_page = config.fetch(:per_page, active_admin_config.per_page)
132
132
 
133
- paginated_collection(collection, entry_name: active_admin_config.resource_label,
134
- entries_name: active_admin_config.plural_resource_label(count: collection_size),
135
- download_links: download_links,
136
- paginator: paginator,
137
- per_page: per_page,
133
+ paginated_collection(collection, entry_name: active_admin_config.resource_label,
134
+ entries_name: active_admin_config.plural_resource_label(count: collection_size),
135
+ download_links: download_links,
136
+ paginator: paginator,
137
+ per_page: per_page,
138
138
  pagination_total: pagination_total) do
139
139
  div class: 'index_content' do
140
140
  insert_tag(renderer_class, config, collection)
@@ -1,4 +1,4 @@
1
- // SASS variable overrides must be declared before loading up Active Admin's styles.
1
+ // Sass variable overrides must be declared before loading up Active Admin's styles.
2
2
  //
3
3
  // To view the variables that Active Admin provides, take a look at
4
4
  // `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the
@@ -11,7 +11,7 @@
11
11
  @import "active_admin/mixins";
12
12
  @import "active_admin/base";
13
13
 
14
- // Overriding any non-variable SASS must be done after the fact.
14
+ // Overriding any non-variable Sass must be done after the fact.
15
15
  // For example, to change the default status-tag color:
16
16
  //
17
17
  // .status_tag { background: #6090DB; }
@@ -7,13 +7,13 @@ module ActiveAdmin
7
7
  desc "Creates an admin user and uses Devise for authentication"
8
8
  argument :name, type: :string, default: "AdminUser"
9
9
 
10
- class_option :registerable, type: :boolean, default: false,
11
- desc: "Should the generated resource be registerable?"
10
+ class_option :registerable, type: :boolean, default: false,
11
+ desc: "Should the generated resource be registerable?"
12
12
 
13
13
  RESERVED_NAMES = [:active_admin_user]
14
14
 
15
- class_option :default_user, type: :boolean, default: true,
16
- desc: "Should a default user be created inside the migration?"
15
+ class_option :default_user, type: :boolean, default: true,
16
+ desc: "Should a default user be created inside the migration?"
17
17
 
18
18
  def install_devise
19
19
  begin
@@ -294,7 +294,7 @@ ActiveAdmin.setup do |config|
294
294
  # config.include_default_association_filters = true
295
295
 
296
296
  # config.maximum_association_filter_arity = 256 # default value of :unlimited will change to 256 in a future version
297
- # config.filter_columns_for_large_association, [
297
+ # config.filter_columns_for_large_association = [
298
298
  # :display_name,
299
299
  # :full_name,
300
300
  # :name,
@@ -303,7 +303,7 @@ ActiveAdmin.setup do |config|
303
303
  # :title,
304
304
  # :email,
305
305
  # ]
306
- # config.filter_method_for_large_association, '_starts_with'
306
+ # config.filter_method_for_large_association = '_starts_with'
307
307
 
308
308
  # == Head
309
309
  #
@@ -6,7 +6,7 @@ module ActiveAdmin
6
6
  desc "Registers resources with Active Admin"
7
7
 
8
8
  class_option :include_boilerplate, type: :boolean, default: false,
9
- desc: "Generate boilerplate code for your resource."
9
+ desc: "Generate boilerplate code for your resource."
10
10
 
11
11
  source_root File.expand_path('templates', __dir__)
12
12
 
@@ -1,4 +1,4 @@
1
- // SASS variable overrides must be declared before loading up Active Admin's styles.
1
+ // Sass variable overrides must be declared before loading up Active Admin's styles.
2
2
  //
3
3
  // To view the variables that Active Admin provides, take a look at
4
4
  // `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the
@@ -11,7 +11,7 @@
11
11
  @import "~@activeadmin/activeadmin/src/scss/mixins";
12
12
  @import "~@activeadmin/activeadmin/src/scss/base";
13
13
 
14
- // Overriding any non-variable SASS must be done after the fact.
14
+ // Overriding any non-variable Sass must be done after the fact.
15
15
  // For example, to change the default status-tag color:
16
16
  //
17
17
  // .status_tag { background: #6090DB; }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Maresh
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2020-03-31 00:00:00.000000000 Z
18
+ date: 2020-09-04 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: arbre
@@ -41,16 +41,22 @@ dependencies:
41
41
  name: formtastic
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - "~>"
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '3.1'
47
+ - - "<"
48
+ - !ruby/object:Gem::Version
49
+ version: '5.0'
47
50
  type: :runtime
48
51
  prerelease: false
49
52
  version_requirements: !ruby/object:Gem::Requirement
50
53
  requirements:
51
- - - "~>"
54
+ - - ">="
52
55
  - !ruby/object:Gem::Version
53
56
  version: '3.1'
57
+ - - "<"
58
+ - !ruby/object:Gem::Version
59
+ version: '5.0'
54
60
  - !ruby/object:Gem::Dependency
55
61
  name: formtastic_i18n
56
62
  requirement: !ruby/object:Gem::Requirement
@@ -102,7 +108,7 @@ dependencies:
102
108
  version: '1.0'
103
109
  - - ">="
104
110
  - !ruby/object:Gem::Version
105
- version: 1.0.1
111
+ version: 1.2.1
106
112
  type: :runtime
107
113
  prerelease: false
108
114
  version_requirements: !ruby/object:Gem::Requirement
@@ -112,7 +118,7 @@ dependencies:
112
118
  version: '1.0'
113
119
  - - ">="
114
120
  - !ruby/object:Gem::Version
115
- version: 1.0.1
121
+ version: 1.2.1
116
122
  - !ruby/object:Gem::Dependency
117
123
  name: railties
118
124
  requirement: !ruby/object:Gem::Requirement
@@ -394,6 +400,7 @@ files:
394
400
  - lib/active_admin/batch_actions/views/selection_cells.rb
395
401
  - lib/active_admin/callbacks.rb
396
402
  - lib/active_admin/cancan_adapter.rb
403
+ - lib/active_admin/collection_decorator.rb
397
404
  - lib/active_admin/component.rb
398
405
  - lib/active_admin/controller_action.rb
399
406
  - lib/active_admin/csv_builder.rb
@@ -597,14 +604,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
597
604
  requirements:
598
605
  - - ">="
599
606
  - !ruby/object:Gem::Version
600
- version: '2.4'
607
+ version: '2.5'
601
608
  required_rubygems_version: !ruby/object:Gem::Requirement
602
609
  requirements:
603
610
  - - ">="
604
611
  - !ruby/object:Gem::Version
605
612
  version: '0'
606
613
  requirements: []
607
- rubygems_version: 3.2.0.pre1
614
+ rubygems_version: 3.2.0.rc.1
608
615
  signing_key:
609
616
  specification_version: 4
610
617
  summary: Active Admin is a Ruby on Rails plugin for generating administration style