activeadmin 2.8.0 → 2.8.1

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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/app/assets/javascripts/active_admin/base.js +1 -1
  4. data/docs/Gemfile +2 -2
  5. data/lib/active_admin.rb +56 -56
  6. data/lib/active_admin/application.rb +8 -8
  7. data/lib/active_admin/application_settings.rb +3 -3
  8. data/lib/active_admin/base_controller.rb +4 -4
  9. data/lib/active_admin/base_controller/authorization.rb +4 -3
  10. data/lib/active_admin/batch_actions/controller.rb +1 -1
  11. data/lib/active_admin/batch_actions/resource_extension.rb +9 -8
  12. data/lib/active_admin/batch_actions/views/batch_action_form.rb +2 -2
  13. data/lib/active_admin/batch_actions/views/batch_action_selector.rb +1 -1
  14. data/lib/active_admin/batch_actions/views/selection_cells.rb +3 -3
  15. data/lib/active_admin/cancan_adapter.rb +1 -1
  16. data/lib/active_admin/dependency.rb +4 -4
  17. data/lib/active_admin/devise.rb +5 -5
  18. data/lib/active_admin/dsl.rb +1 -1
  19. data/lib/active_admin/dynamic_settings_node.rb +2 -2
  20. data/lib/active_admin/engine.rb +3 -3
  21. data/lib/active_admin/filters.rb +6 -6
  22. data/lib/active_admin/filters/active.rb +1 -1
  23. data/lib/active_admin/filters/active_filter.rb +5 -4
  24. data/lib/active_admin/filters/active_sidebar.rb +5 -5
  25. data/lib/active_admin/filters/forms.rb +3 -3
  26. data/lib/active_admin/filters/formtastic_addons.rb +1 -6
  27. data/lib/active_admin/form_builder.rb +18 -16
  28. data/lib/active_admin/generators/boilerplate.rb +1 -1
  29. data/lib/active_admin/inputs/datepicker_input.rb +1 -1
  30. data/lib/active_admin/inputs/filters/base.rb +1 -1
  31. data/lib/active_admin/inputs/filters/base/search_method_select.rb +2 -2
  32. data/lib/active_admin/inputs/filters/boolean_input.rb +1 -1
  33. data/lib/active_admin/inputs/filters/check_boxes_input.rb +1 -1
  34. data/lib/active_admin/inputs/filters/select_input.rb +2 -2
  35. data/lib/active_admin/localizers.rb +1 -1
  36. data/lib/active_admin/localizers/resource_localizer.rb +3 -3
  37. data/lib/active_admin/menu.rb +1 -1
  38. data/lib/active_admin/menu_item.rb +1 -1
  39. data/lib/active_admin/namespace.rb +7 -7
  40. data/lib/active_admin/namespace_settings.rb +5 -5
  41. data/lib/active_admin/order_clause.rb +1 -1
  42. data/lib/active_admin/orm/active_record.rb +1 -1
  43. data/lib/active_admin/orm/active_record/comments.rb +13 -13
  44. data/lib/active_admin/orm/active_record/comments/views.rb +2 -2
  45. data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +17 -17
  46. data/lib/active_admin/page.rb +1 -1
  47. data/lib/active_admin/pundit_adapter.rb +1 -1
  48. data/lib/active_admin/resource.rb +17 -17
  49. data/lib/active_admin/resource/action_items.rb +4 -4
  50. data/lib/active_admin/resource/attributes.rb +1 -1
  51. data/lib/active_admin/resource/belongs_to.rb +2 -2
  52. data/lib/active_admin/resource/controllers.rb +1 -1
  53. data/lib/active_admin/resource/naming.rb +2 -2
  54. data/lib/active_admin/resource/routes.rb +1 -1
  55. data/lib/active_admin/resource/sidebars.rb +1 -1
  56. data/lib/active_admin/resource_controller.rb +9 -9
  57. data/lib/active_admin/resource_controller/decorators.rb +1 -1
  58. data/lib/active_admin/resource_controller/streaming.rb +7 -6
  59. data/lib/active_admin/scope.rb +1 -1
  60. data/lib/active_admin/version.rb +1 -1
  61. data/lib/active_admin/view_factory.rb +1 -1
  62. data/lib/active_admin/view_helpers.rb +1 -1
  63. data/lib/active_admin/view_helpers/breadcrumb_helper.rb +2 -2
  64. data/lib/active_admin/view_helpers/display_helper.rb +2 -2
  65. data/lib/active_admin/view_helpers/download_format_links_helper.rb +1 -1
  66. data/lib/active_admin/view_helpers/fields_for.rb +1 -1
  67. data/lib/active_admin/views.rb +1 -1
  68. data/lib/active_admin/views/components/active_admin_form.rb +5 -5
  69. data/lib/active_admin/views/components/attributes_table.rb +3 -3
  70. data/lib/active_admin/views/components/blank_slate.rb +1 -1
  71. data/lib/active_admin/views/components/dropdown_menu.rb +6 -6
  72. data/lib/active_admin/views/components/index_list.rb +2 -2
  73. data/lib/active_admin/views/components/menu.rb +1 -1
  74. data/lib/active_admin/views/components/menu_item.rb +3 -3
  75. data/lib/active_admin/views/components/paginated_collection.rb +6 -6
  76. data/lib/active_admin/views/components/panel.rb +1 -1
  77. data/lib/active_admin/views/components/scopes.rb +5 -5
  78. data/lib/active_admin/views/components/site_title.rb +1 -1
  79. data/lib/active_admin/views/components/status_tag.rb +11 -11
  80. data/lib/active_admin/views/components/table_for.rb +7 -7
  81. data/lib/active_admin/views/components/tabs.rb +2 -2
  82. data/lib/active_admin/views/footer.rb +2 -1
  83. data/lib/active_admin/views/header.rb +2 -2
  84. data/lib/active_admin/views/index_as_blog.rb +1 -1
  85. data/lib/active_admin/views/index_as_grid.rb +1 -1
  86. data/lib/active_admin/views/index_as_table.rb +11 -11
  87. data/lib/active_admin/views/pages/base.rb +6 -6
  88. data/lib/active_admin/views/pages/index.rb +10 -9
  89. data/lib/active_admin/views/tabbed_navigation.rb +2 -2
  90. data/lib/active_admin/views/title_bar.rb +1 -1
  91. data/lib/activeadmin.rb +1 -1
  92. data/lib/generators/active_admin/assets/assets_generator.rb +2 -2
  93. data/lib/generators/active_admin/devise/devise_generator.rb +1 -1
  94. data/lib/generators/active_admin/install/install_generator.rb +7 -7
  95. data/lib/generators/active_admin/page/page_generator.rb +1 -1
  96. data/lib/generators/active_admin/resource/resource_generator.rb +2 -2
  97. data/lib/generators/active_admin/webpacker/webpacker_generator.rb +7 -7
  98. data/lib/ransack_ext.rb +8 -8
  99. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1eae0d60f49f4133f9500f31625e24882ac57efa140f8052c87dd65a0cfbd353
4
- data.tar.gz: 8db6863400174d2ed23adcf9985efff541ef858afe56339822d9cf02411052c4
3
+ metadata.gz: d5319bddf9e28d0adf5521d932bfb6b1a27bb8a0f0b84116bf5014148fe04ef8
4
+ data.tar.gz: 4b41ed99a504af4c5c82f84a959c16a6efa703f09970c4e61b0fc9dd48dbccea
5
5
  SHA512:
6
- metadata.gz: cf3d8b2a337b50a73a5806ce18e2c40c9985d5db2a064d417057b349d172909fb1ed6e248ea271c76e331a76a76578f975e044373dbc0ca5bd2141f0ac365df4
7
- data.tar.gz: 88b06f52c04bae83a5068301b0013366db174638392a8b850bec32b20ff3e72adfb480335211558319ee671b1a7a28955fbf4334b8ebf89c836107c7b85c1e61
6
+ metadata.gz: c15f0a18dab4b6dd28c433d4481c18fc00a406dbad22f397035ad1dcd5fdff5a7e11018bc39fd15af3e92644a94d311b39a6268ff625e5b6c1372424807a8ced
7
+ data.tar.gz: 444c6aac584a1a13131cdf7b2f1f6c4f2d5a6d4a565c1dee172944837960297223e661534f502e2a1f3624606b9b083337625cd2b2db4eaf0dae357b42f466bd
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.8.1 [☰](https://github.com/activeadmin/activeadmin/compare/v2.8.0..v2.8.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * Fix `permitted_param` generation for `belongs_to` when `:param` is used. [#6460] by [@deivid-rodriguez]
10
+ * Fix streaming CSV export. [#6451] by [@deivid-rodriguez]
11
+ * Fix input string filter no rendering dropdown input when its column name ends with a ransack predicate. [#6422] by [@Fivell]
12
+
5
13
  ## 2.8.0 [☰](https://github.com/activeadmin/activeadmin/compare/v2.7.0..v2.8.0)
6
14
 
7
15
  ### Enhancements
@@ -611,6 +619,9 @@ Please check [0-6-stable] for previous changes.
611
619
  [#6341]: https://github.com/activeadmin/activeadmin/pull/6341
612
620
  [#6368]: https://github.com/activeadmin/activeadmin/pull/6368
613
621
  [#6393]: https://github.com/activeadmin/activeadmin/pull/6393
622
+ [#6422]: https://github.com/activeadmin/activeadmin/pull/6422
623
+ [#6451]: https://github.com/activeadmin/activeadmin/pull/6451
624
+ [#6460]: https://github.com/activeadmin/activeadmin/pull/6460
614
625
 
615
626
  [@5t111111]: https://github.com/5t111111
616
627
  [@aarek]: https://github.com/aarek
@@ -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";
@@ -1,3 +1,3 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
- gem 'github-pages'
3
+ gem "github-pages"
@@ -1,58 +1,58 @@
1
- require 'active_support/core_ext'
2
- require 'set'
1
+ require "active_support/core_ext"
2
+ require "set"
3
3
 
4
- require 'ransack'
5
- require 'ransack_ext'
6
- require 'kaminari'
7
- require 'formtastic'
8
- require 'formtastic_i18n'
9
- require 'inherited_resources'
10
- require 'jquery-rails'
11
- require 'sassc-rails'
12
- require 'arbre'
4
+ require "ransack"
5
+ require "ransack_ext"
6
+ require "kaminari"
7
+ require "formtastic"
8
+ require "formtastic_i18n"
9
+ require "inherited_resources"
10
+ require "jquery-rails"
11
+ require "sassc-rails"
12
+ require "arbre"
13
13
 
14
- require 'active_admin/helpers/i18n'
14
+ require "active_admin/helpers/i18n"
15
15
 
16
16
  module ActiveAdmin
17
17
 
18
- autoload :VERSION, 'active_admin/version'
19
- autoload :Application, 'active_admin/application'
20
- autoload :AssetRegistration, 'active_admin/asset_registration'
21
- autoload :Authorization, 'active_admin/authorization_adapter'
22
- autoload :AuthorizationAdapter, 'active_admin/authorization_adapter'
23
- autoload :Callbacks, 'active_admin/callbacks'
24
- autoload :Component, 'active_admin/component'
25
- autoload :BaseController, 'active_admin/base_controller'
26
- autoload :CanCanAdapter, 'active_admin/cancan_adapter'
27
- autoload :ControllerAction, 'active_admin/controller_action'
28
- autoload :CSVBuilder, 'active_admin/csv_builder'
29
- autoload :Dependency, 'active_admin/dependency'
30
- autoload :Deprecation, 'active_admin/deprecation'
31
- autoload :Devise, 'active_admin/devise'
32
- autoload :DSL, 'active_admin/dsl'
33
- autoload :FormBuilder, 'active_admin/form_builder'
34
- autoload :Inputs, 'active_admin/inputs'
35
- autoload :Localizers, 'active_admin/localizers'
36
- autoload :Menu, 'active_admin/menu'
37
- autoload :MenuCollection, 'active_admin/menu_collection'
38
- autoload :MenuItem, 'active_admin/menu_item'
39
- autoload :Namespace, 'active_admin/namespace'
40
- autoload :OrderClause, 'active_admin/order_clause'
41
- autoload :Page, 'active_admin/page'
42
- autoload :PagePresenter, 'active_admin/page_presenter'
43
- autoload :PageController, 'active_admin/page_controller'
44
- autoload :PageDSL, 'active_admin/page_dsl'
45
- autoload :PunditAdapter, 'active_admin/pundit_adapter'
46
- autoload :Resource, 'active_admin/resource'
47
- autoload :ResourceController, 'active_admin/resource_controller'
48
- autoload :ResourceDSL, 'active_admin/resource_dsl'
49
- autoload :Scope, 'active_admin/scope'
50
- autoload :ScopeChain, 'active_admin/helpers/scope_chain'
51
- autoload :SidebarSection, 'active_admin/sidebar_section'
52
- autoload :TableBuilder, 'active_admin/table_builder'
53
- autoload :ViewFactory, 'active_admin/view_factory'
54
- autoload :ViewHelpers, 'active_admin/view_helpers'
55
- autoload :Views, 'active_admin/views'
18
+ autoload :VERSION, "active_admin/version"
19
+ autoload :Application, "active_admin/application"
20
+ autoload :AssetRegistration, "active_admin/asset_registration"
21
+ autoload :Authorization, "active_admin/authorization_adapter"
22
+ autoload :AuthorizationAdapter, "active_admin/authorization_adapter"
23
+ autoload :Callbacks, "active_admin/callbacks"
24
+ autoload :Component, "active_admin/component"
25
+ autoload :BaseController, "active_admin/base_controller"
26
+ autoload :CanCanAdapter, "active_admin/cancan_adapter"
27
+ autoload :ControllerAction, "active_admin/controller_action"
28
+ autoload :CSVBuilder, "active_admin/csv_builder"
29
+ autoload :Dependency, "active_admin/dependency"
30
+ autoload :Deprecation, "active_admin/deprecation"
31
+ autoload :Devise, "active_admin/devise"
32
+ autoload :DSL, "active_admin/dsl"
33
+ autoload :FormBuilder, "active_admin/form_builder"
34
+ autoload :Inputs, "active_admin/inputs"
35
+ autoload :Localizers, "active_admin/localizers"
36
+ autoload :Menu, "active_admin/menu"
37
+ autoload :MenuCollection, "active_admin/menu_collection"
38
+ autoload :MenuItem, "active_admin/menu_item"
39
+ autoload :Namespace, "active_admin/namespace"
40
+ autoload :OrderClause, "active_admin/order_clause"
41
+ autoload :Page, "active_admin/page"
42
+ autoload :PagePresenter, "active_admin/page_presenter"
43
+ autoload :PageController, "active_admin/page_controller"
44
+ autoload :PageDSL, "active_admin/page_dsl"
45
+ autoload :PunditAdapter, "active_admin/pundit_adapter"
46
+ autoload :Resource, "active_admin/resource"
47
+ autoload :ResourceController, "active_admin/resource_controller"
48
+ autoload :ResourceDSL, "active_admin/resource_dsl"
49
+ autoload :Scope, "active_admin/scope"
50
+ autoload :ScopeChain, "active_admin/helpers/scope_chain"
51
+ autoload :SidebarSection, "active_admin/sidebar_section"
52
+ autoload :TableBuilder, "active_admin/table_builder"
53
+ autoload :ViewFactory, "active_admin/view_factory"
54
+ autoload :ViewHelpers, "active_admin/view_helpers"
55
+ autoload :Views, "active_admin/views"
56
56
 
57
57
  class << self
58
58
 
@@ -121,13 +121,13 @@ module ActiveAdmin
121
121
  end
122
122
 
123
123
  # Require things that don't support autoload
124
- require 'active_admin/engine'
125
- require 'active_admin/error'
124
+ require "active_admin/engine"
125
+ require "active_admin/error"
126
126
 
127
127
  # Require internal plugins
128
- require 'active_admin/batch_actions'
129
- require 'active_admin/filters'
128
+ require "active_admin/batch_actions"
129
+ require "active_admin/filters"
130
130
 
131
131
  # Require ORM-specific plugins
132
- require 'active_admin/orm/active_record' if defined? ActiveRecord
133
- require 'active_admin/orm/mongoid' if defined? Mongoid
132
+ require "active_admin/orm/active_record" if defined? ActiveRecord
133
+ require "active_admin/orm/mongoid" if defined? Mongoid
@@ -1,6 +1,6 @@
1
- require 'active_admin/router'
2
- require 'active_admin/application_settings'
3
- require 'active_admin/namespace_settings'
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 = 'active_admin.application.before_load'.freeze
49
- AfterLoadEvent = 'active_admin.application.after_load'.freeze
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 'active_admin.css', media: 'screen'
168
- register_stylesheet 'active_admin/print.css', media: 'print'
169
- register_javascript 'active_admin.js'
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 'active_admin/settings_node'
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('app/admin', Rails.root)]
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, ['development']
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]
@@ -1,5 +1,5 @@
1
- require 'active_admin/base_controller/authorization'
2
- require 'active_admin/base_controller/menu'
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 : 'active_admin'
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
 
@@ -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(current_active_admin_user,
56
- action,
57
- subject)
55
+ raise ActiveAdmin::AccessDenied.new(
56
+ current_active_admin_user,
57
+ action,
58
+ subject)
58
59
  end
59
60
  end
60
61
 
@@ -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, &current_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('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) }
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('active_admin.delete') }, destroy_options do |selected_ids|
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("active_admin.batch_actions.succesfully_destroyed",
72
- count: selected_ids.count,
73
- model: active_admin_config.resource_label.downcase,
74
- plural_model: active_admin_config.plural_resource_label(count: selected_ids.count).downcase)
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 'active_admin.batch_actions.default_confirmation' }
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 'active_admin/component'
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
- '</form>'.html_safe
33
+ "</form>".html_safe
34
34
  end
35
35
 
36
36
  end
@@ -1,4 +1,4 @@
1
- require 'active_admin/component'
1
+ require "active_admin/component"
2
2
 
3
3
  module ActiveAdmin
4
4
  module BatchActions
@@ -1,4 +1,4 @@
1
- require 'active_admin/component'
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('active_admin.batch_actions.selection_toggle_explanation', default: "(Toggle Selection)"))
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 'cancan'
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.0', '< 5'
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}" : '(missing)'
94
+ info = spec ? "#{spec.name} #{spec.version}" : "(missing)"
95
95
  "<ActiveAdmin::Dependency::Matcher for #{info}>"
96
96
  end
97
97
  end
@@ -1,6 +1,6 @@
1
1
  ActiveAdmin::Dependency.devise! ActiveAdmin::Dependency::Requirements::DEVISE
2
2
 
3
- require 'devise'
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: 'login', sign_out: "logout" },
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 'active_admin_logged_out'
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