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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +54 -8
- data/CONTRIBUTING.md +1 -17
- data/app/assets/javascripts/active_admin/base.js +13 -15
- data/app/assets/stylesheets/active_admin/components/_comments.scss +2 -2
- 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 +2 -2
- data/config/locales/ar.yml +6 -6
- 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/docs/11-decorators.md +16 -5
- data/docs/Gemfile.lock +36 -26
- data/lib/active_admin.rb +43 -43
- 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 +4 -4
- data/lib/active_admin/dependency.rb +7 -7
- data/lib/active_admin/filters.rb +1 -1
- data/lib/active_admin/filters/forms.rb +3 -3
- data/lib/active_admin/filters/resource_extension.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/menu_item.rb +7 -7
- data/lib/active_admin/namespace.rb +7 -7
- data/lib/active_admin/orm/active_record/comments.rb +11 -11
- 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/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 +3 -3
- 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.rb +4 -3
- 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_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/table_for.rb +10 -10
- 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 +1 -1
- data/lib/active_admin/views/pages/index.rb +8 -8
- 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/templates/active_admin.rb.erb +2 -2
- data/lib/generators/active_admin/resource/resource_generator.rb +1 -1
- data/lib/generators/active_admin/webpacker/templates/active_admin.scss +2 -2
- metadata +15 -8
@@ -38,10 +38,10 @@ module ActiveAdmin
|
|
38
38
|
options = args.extract_options!
|
39
39
|
method = args.first
|
40
40
|
|
41
|
-
scope_to_config[:method]
|
42
|
-
scope_to_config[:association_method]
|
43
|
-
scope_to_config[:if]
|
44
|
-
scope_to_config[:unless]
|
41
|
+
scope_to_config[:method] = block || method
|
42
|
+
scope_to_config[:association_method] = options[:association_method]
|
43
|
+
scope_to_config[:if] = options[:if]
|
44
|
+
scope_to_config[:unless] = options[:unless]
|
45
45
|
|
46
46
|
end
|
47
47
|
|
@@ -55,10 +55,10 @@ module ActiveAdmin
|
|
55
55
|
|
56
56
|
def scope_to_config
|
57
57
|
@scope_to_config ||= {
|
58
|
-
method:
|
58
|
+
method: nil,
|
59
59
|
association_method: nil,
|
60
|
-
if:
|
61
|
-
unless:
|
60
|
+
if: nil,
|
61
|
+
unless: nil
|
62
62
|
}
|
63
63
|
end
|
64
64
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'active_admin/collection_decorator'
|
1
2
|
require 'active_admin/resource_controller/action_builder'
|
2
3
|
require 'active_admin/resource_controller/data_access'
|
3
4
|
require 'active_admin/resource_controller/decorators'
|
@@ -24,13 +25,13 @@ module ActiveAdmin
|
|
24
25
|
include Streaming
|
25
26
|
include Sidebars
|
26
27
|
include ViewHelpers::DownloadFormatLinksHelper
|
27
|
-
extend
|
28
|
+
extend ResourceClassMethods
|
28
29
|
|
29
30
|
def self.active_admin_config=(config)
|
30
31
|
if @active_admin_config = config
|
31
32
|
defaults resource_class: config.resource_class,
|
32
|
-
route_prefix:
|
33
|
-
instance_name:
|
33
|
+
route_prefix: config.route_prefix,
|
34
|
+
instance_name: config.resource_name.singular
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
@@ -258,7 +258,7 @@ module ActiveAdmin
|
|
258
258
|
end
|
259
259
|
|
260
260
|
def collection_applies(options = {})
|
261
|
-
only
|
261
|
+
only = Array(options.fetch(:only, COLLECTION_APPLIES))
|
262
262
|
except = Array(options.fetch(:except, []))
|
263
263
|
|
264
264
|
COLLECTION_APPLIES & only - except
|
@@ -53,13 +53,8 @@ module ActiveAdmin
|
|
53
53
|
|
54
54
|
def self.wrap(decorator)
|
55
55
|
collection_decorator = find_collection_decorator(decorator)
|
56
|
-
|
57
|
-
|
58
|
-
name = "#{collection_decorator.name} of #{decorator} + ActiveAdmin"
|
59
|
-
@cache[name] ||= wrap! collection_decorator, name
|
60
|
-
else
|
61
|
-
collection_decorator
|
62
|
-
end
|
56
|
+
name = "#{collection_decorator.name} of #{decorator} + ActiveAdmin"
|
57
|
+
@cache[name] ||= wrap! collection_decorator, name
|
63
58
|
end
|
64
59
|
|
65
60
|
private
|
@@ -68,34 +63,19 @@ module ActiveAdmin
|
|
68
63
|
::Class.new parent do
|
69
64
|
delegate :reorder, :page, :current_page, :total_pages, :limit_value,
|
70
65
|
:total_count, :total_pages, :offset, :to_key, :group_values,
|
71
|
-
:except, :find_each, :ransack
|
66
|
+
:except, :find_each, :ransack, to: :object
|
72
67
|
|
73
68
|
define_singleton_method(:name) { name }
|
74
69
|
end
|
75
70
|
end
|
76
71
|
|
77
|
-
# Draper::CollectionDecorator was introduced in 1.0.0
|
78
|
-
# Draper::Decorator#collection_decorator_class was introduced in 1.3.0
|
79
72
|
def self.find_collection_decorator(decorator)
|
80
|
-
if
|
73
|
+
if decorator.respond_to?(:collection_decorator_class)
|
81
74
|
decorator.collection_decorator_class
|
82
|
-
elsif Dependency.draper? '>= 1.0.0'
|
83
|
-
draper_collection_decorator
|
84
75
|
else
|
85
|
-
|
76
|
+
CollectionDecorator
|
86
77
|
end
|
87
78
|
end
|
88
|
-
|
89
|
-
def self.draper_collection_decorator?(decorator)
|
90
|
-
decorator && decorator <= draper_collection_decorator
|
91
|
-
rescue NameError
|
92
|
-
false
|
93
|
-
end
|
94
|
-
|
95
|
-
def self.draper_collection_decorator
|
96
|
-
::Draper::CollectionDecorator
|
97
|
-
end
|
98
|
-
|
99
79
|
end
|
100
80
|
end
|
101
81
|
end
|
@@ -183,16 +183,16 @@ module ActiveAdmin
|
|
183
183
|
# == Before / After Destroy
|
184
184
|
# Called before and after the object is destroyed from the database.
|
185
185
|
#
|
186
|
-
delegate :before_build,
|
187
|
-
delegate :before_create,
|
188
|
-
delegate :before_update,
|
189
|
-
delegate :before_save,
|
186
|
+
delegate :before_build, :after_build, to: :controller
|
187
|
+
delegate :before_create, :after_create, to: :controller
|
188
|
+
delegate :before_update, :after_update, to: :controller
|
189
|
+
delegate :before_save, :after_save, to: :controller
|
190
190
|
delegate :before_destroy, :after_destroy, to: :controller
|
191
191
|
|
192
192
|
# This code defines both *_filter and *_action for Rails 5.0 and *_action for Rails >= 5.1
|
193
193
|
phases = [
|
194
194
|
:before, :skip_before,
|
195
|
-
:after,
|
195
|
+
:after, :skip_after,
|
196
196
|
:around, :skip
|
197
197
|
]
|
198
198
|
keywords = if Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR >= 1
|
data/lib/active_admin/scope.rb
CHANGED
@@ -45,11 +45,11 @@ module ActiveAdmin
|
|
45
45
|
@scope_block = block
|
46
46
|
end
|
47
47
|
|
48
|
-
@localizer
|
49
|
-
@show_count
|
50
|
-
@display_if_block = options[:if]
|
51
|
-
@default_block
|
52
|
-
@group
|
48
|
+
@localizer = options[:localizer]
|
49
|
+
@show_count = options.fetch(:show_count, true)
|
50
|
+
@display_if_block = options[:if] || proc { true }
|
51
|
+
@default_block = options[:default] || proc { false }
|
52
|
+
@group = options[:group].try(:to_sym)
|
53
53
|
end
|
54
54
|
|
55
55
|
def name
|
data/lib/active_admin/version.rb
CHANGED
@@ -4,24 +4,24 @@ module ActiveAdmin
|
|
4
4
|
class ViewFactory < AbstractViewFactory
|
5
5
|
|
6
6
|
# Register Helper Renderers
|
7
|
-
register
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
register global_navigation: ActiveAdmin::Views::TabbedNavigation,
|
8
|
+
utility_navigation: ActiveAdmin::Views::TabbedNavigation,
|
9
|
+
site_title: ActiveAdmin::Views::SiteTitle,
|
10
|
+
unsupported_browser: ActiveAdmin::Views::UnsupportedBrowser,
|
11
|
+
action_items: ActiveAdmin::Views::ActionItems,
|
12
|
+
title_bar: ActiveAdmin::Views::TitleBar,
|
13
|
+
header: ActiveAdmin::Views::Header,
|
14
|
+
footer: ActiveAdmin::Views::Footer,
|
15
|
+
index_scopes: ActiveAdmin::Views::Scopes,
|
16
|
+
blank_slate: ActiveAdmin::Views::BlankSlate
|
17
17
|
|
18
18
|
# Register All The Pages
|
19
|
-
register
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
register index_page: ActiveAdmin::Views::Pages::Index,
|
20
|
+
show_page: ActiveAdmin::Views::Pages::Show,
|
21
|
+
new_page: ActiveAdmin::Views::Pages::Form,
|
22
|
+
edit_page: ActiveAdmin::Views::Pages::Form,
|
23
|
+
layout: ActiveAdmin::Views::Pages::Layout,
|
24
|
+
page: ActiveAdmin::Views::Pages::Page
|
25
25
|
|
26
26
|
end
|
27
27
|
end
|
@@ -15,7 +15,7 @@ module ActiveAdmin
|
|
15
15
|
if part =~ /\A(\d+|[a-f0-9]{24}|(?:[a-f0-9]{8}-(?:[a-f0-9]{4}-){3}[a-f0-9]{12}))\z/ && parts[index - 1]
|
16
16
|
parent = active_admin_config.belongs_to_config.try :target
|
17
17
|
config = parent && parent.resource_name.route_key == parts[index - 1] ? parent : active_admin_config
|
18
|
-
name
|
18
|
+
name = display_name config.find_resource part
|
19
19
|
end
|
20
20
|
name ||= I18n.t "activerecord.models.#{part.singularize}", count: ::ActiveAdmin::Helpers::I18n::PLURAL_MANY_COUNT, default: part.titlecase
|
21
21
|
|
@@ -5,7 +5,7 @@ module ActiveAdmin
|
|
5
5
|
DISPLAY_NAME_FALLBACK = -> {
|
6
6
|
name = ""
|
7
7
|
klass = self.class
|
8
|
-
name << klass.model_name.human
|
8
|
+
name << klass.model_name.human if klass.respond_to? :model_name
|
9
9
|
name << " ##{send(klass.primary_key)}" if klass.respond_to? :primary_key
|
10
10
|
name.present? ? name : to_s
|
11
11
|
}
|
@@ -26,7 +26,7 @@ module ActiveAdmin
|
|
26
26
|
@@display_name_methods_cache ||= {}
|
27
27
|
@@display_name_methods_cache[resource.class] ||= begin
|
28
28
|
methods = active_admin_application.display_name_methods - association_methods_for(resource)
|
29
|
-
method
|
29
|
+
method = methods.detect { |method| resource.respond_to? method }
|
30
30
|
|
31
31
|
if method != :to_s || resource.method(method).source_location
|
32
32
|
method
|
@@ -74,7 +74,7 @@ module ActiveAdmin
|
|
74
74
|
format_collection(object)
|
75
75
|
else
|
76
76
|
if defined?(::ActiveRecord) && object.is_a?(ActiveRecord::Base) ||
|
77
|
-
defined?(::Mongoid)
|
77
|
+
defined?(::Mongoid) && object.class.include?(Mongoid::Document)
|
78
78
|
auto_link object
|
79
79
|
elsif defined?(::ActiveRecord) && object.is_a?(ActiveRecord::Relation)
|
80
80
|
format_collection(object)
|
@@ -15,7 +15,7 @@ module ActiveAdmin
|
|
15
15
|
#
|
16
16
|
def fields_for_params(params, options = {})
|
17
17
|
namespace = options[:namespace]
|
18
|
-
except
|
18
|
+
except = Array.wrap(options[:except]).map &:to_s
|
19
19
|
|
20
20
|
params.flat_map do |k, v|
|
21
21
|
next if namespace.nil? && %w(controller action commit utf8).include?(k.to_s)
|
@@ -5,7 +5,7 @@ module ActiveAdmin
|
|
5
5
|
builder_method :attributes_table_for
|
6
6
|
|
7
7
|
def build(obj, *attrs)
|
8
|
-
@collection
|
8
|
+
@collection = Array.wrap(obj)
|
9
9
|
@resource_class = @collection.first.class
|
10
10
|
options = {}
|
11
11
|
options[:for] = @collection.first if single_record?
|
@@ -20,7 +20,7 @@ module ActiveAdmin
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def row(*args, &block)
|
23
|
-
title
|
23
|
+
title = args[0]
|
24
24
|
options = args.extract_options!
|
25
25
|
classes = [:row]
|
26
26
|
if options[:class]
|
@@ -37,7 +37,7 @@ module ActiveAdmin
|
|
37
37
|
def build_index_list(index_class)
|
38
38
|
li class: classes_for_index(index_class) do
|
39
39
|
params = request.query_parameters.except :page, :commit, :format
|
40
|
-
url_with_params = url_for(params.merge(as: index_class.index_name.to_sym))
|
40
|
+
url_with_params = url_for(**params.merge(as: index_class.index_name.to_sym).symbolize_keys)
|
41
41
|
|
42
42
|
a href: url_with_params, class: "table_tools_button" do
|
43
43
|
name = index_class.index_name
|
@@ -38,12 +38,12 @@ module ActiveAdmin
|
|
38
38
|
# download_links => Download links override (false or [:csv, :pdf])
|
39
39
|
#
|
40
40
|
def build(collection, options = {})
|
41
|
-
@collection
|
42
|
-
@params
|
43
|
-
@param_name
|
41
|
+
@collection = collection
|
42
|
+
@params = options.delete(:params)
|
43
|
+
@param_name = options.delete(:param_name)
|
44
44
|
@download_links = options.delete(:download_links)
|
45
|
-
@display_total
|
46
|
-
@per_page
|
45
|
+
@display_total = options.delete(:pagination_total) { true }
|
46
|
+
@per_page = options.delete(:per_page)
|
47
47
|
|
48
48
|
unless collection.respond_to?(:total_pages)
|
49
49
|
raise(StandardError, "Collection is not a paginated scope. Set collection.page(params[:page]).per(10) before calling :paginated_collection.")
|
@@ -93,7 +93,7 @@ module ActiveAdmin
|
|
93
93
|
|
94
94
|
def build_pagination
|
95
95
|
options = { theme: @display_total ? 'active_admin' : 'active_admin_countless' }
|
96
|
-
options[:params]
|
96
|
+
options[:params] = @params if @params
|
97
97
|
options[:param_name] = @param_name if @param_name
|
98
98
|
|
99
99
|
if !@display_total
|
@@ -107,7 +107,7 @@ module ActiveAdmin
|
|
107
107
|
options[:right] = 0
|
108
108
|
end
|
109
109
|
|
110
|
-
text_node paginate collection, options
|
110
|
+
text_node paginate collection, **options
|
111
111
|
end
|
112
112
|
|
113
113
|
include ::ActiveAdmin::Helpers::Collection
|
@@ -116,28 +116,28 @@ module ActiveAdmin
|
|
116
116
|
# modified from will_paginate
|
117
117
|
def page_entries_info(options = {})
|
118
118
|
if options[:entry_name]
|
119
|
-
entry_name
|
119
|
+
entry_name = options[:entry_name]
|
120
120
|
entries_name = options[:entries_name] || entry_name.pluralize
|
121
121
|
elsif collection_is_empty?
|
122
|
-
entry_name
|
122
|
+
entry_name = I18n.t "active_admin.pagination.entry", count: 1, default: 'entry'
|
123
123
|
entries_name = I18n.t "active_admin.pagination.entry", count: 2, default: 'entries'
|
124
124
|
else
|
125
125
|
key = "activerecord.models." + collection.first.class.model_name.i18n_key.to_s
|
126
126
|
|
127
|
-
entry_name
|
127
|
+
entry_name = I18n.translate key, count: 1, default: collection.first.class.name.underscore.sub('_', ' ')
|
128
128
|
entries_name = I18n.translate key, count: collection.size, default: entry_name.pluralize
|
129
129
|
end
|
130
130
|
|
131
131
|
if @display_total
|
132
132
|
if collection.total_pages < 2
|
133
133
|
case collection_size
|
134
|
-
when 0; I18n.t("active_admin.pagination.empty",
|
135
|
-
when 1; I18n.t("active_admin.pagination.one",
|
136
|
-
else;
|
134
|
+
when 0; I18n.t("active_admin.pagination.empty", model: entries_name)
|
135
|
+
when 1; I18n.t("active_admin.pagination.one", model: entry_name)
|
136
|
+
else; I18n.t("active_admin.pagination.one_page", model: entries_name, n: collection.total_count)
|
137
137
|
end
|
138
138
|
else
|
139
139
|
offset = (collection.current_page - 1) * collection.limit_value
|
140
|
-
total
|
140
|
+
total = collection.total_count
|
141
141
|
I18n.t "active_admin.pagination.multiple",
|
142
142
|
model: entries_name,
|
143
143
|
total: total,
|
@@ -8,14 +8,14 @@ module ActiveAdmin
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def build(obj, *attrs)
|
11
|
-
options
|
12
|
-
@sortable
|
13
|
-
@collection
|
11
|
+
options = attrs.extract_options!
|
12
|
+
@sortable = options.delete(:sortable)
|
13
|
+
@collection = obj.respond_to?(:each) && !obj.is_a?(Hash) ? obj : [obj]
|
14
14
|
@resource_class = options.delete(:i18n)
|
15
15
|
@resource_class ||= @collection.klass if @collection.respond_to? :klass
|
16
16
|
|
17
|
-
@columns
|
18
|
-
@row_class
|
17
|
+
@columns = []
|
18
|
+
@row_class = options.delete(:row_class)
|
19
19
|
|
20
20
|
build_table
|
21
21
|
super(options)
|
@@ -29,7 +29,7 @@ module ActiveAdmin
|
|
29
29
|
def column(*args, &block)
|
30
30
|
options = default_options.merge(args.extract_options!)
|
31
31
|
title = args[0]
|
32
|
-
data
|
32
|
+
data = args[1] || args[0]
|
33
33
|
|
34
34
|
col = Column.new(title, data, @resource_class, options, &block)
|
35
35
|
@columns << col
|
@@ -65,12 +65,12 @@ module ActiveAdmin
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def build_table_header(col)
|
68
|
-
classes
|
68
|
+
classes = Arbre::HTML::ClassList.new
|
69
69
|
sort_key = sortable? && col.sortable? && col.sort_key
|
70
|
-
params
|
70
|
+
params = request.query_parameters.except :page, :order, :commit, :format
|
71
71
|
|
72
|
-
classes << 'sortable'
|
73
|
-
classes << "sorted-#{current_sort[1]}"
|
72
|
+
classes << 'sortable' if sort_key
|
73
|
+
classes << "sorted-#{current_sort[1]}" if sort_key && current_sort[0] == sort_key
|
74
74
|
classes << col.html_class
|
75
75
|
|
76
76
|
if sort_key
|
@@ -344,9 +344,9 @@ module ActiveAdmin
|
|
344
344
|
#
|
345
345
|
# ```
|
346
346
|
def actions(options = {}, &block)
|
347
|
-
name
|
348
|
-
defaults
|
349
|
-
dropdown
|
347
|
+
name = options.delete(:name) { '' }
|
348
|
+
defaults = options.delete(:defaults) { true }
|
349
|
+
dropdown = options.delete(:dropdown) { false }
|
350
350
|
dropdown_name = options.delete(:dropdown_name) { I18n.t 'active_admin.dropdown_actions.button_label', default: 'Actions' }
|
351
351
|
|
352
352
|
options[:class] ||= 'col-actions'
|
@@ -381,15 +381,15 @@ module ActiveAdmin
|
|
381
381
|
end
|
382
382
|
if controller.action_methods.include?('destroy') && authorized?(ActiveAdmin::Auth::DESTROY, resource)
|
383
383
|
item localizer.t(:delete), resource_path(resource), class: "delete_link #{options[:css_class]}", title: localizer.t(:delete),
|
384
|
-
|
384
|
+
method: :delete, data: { confirm: localizer.t(:delete_confirmation) }
|
385
385
|
end
|
386
386
|
end
|
387
387
|
|
388
388
|
class TableActions < ActiveAdmin::Component
|
389
389
|
builder_method :table_actions
|
390
390
|
|
391
|
-
def item *args
|
392
|
-
text_node link_to
|
391
|
+
def item *args, **kwargs
|
392
|
+
text_node link_to(*args, **kwargs)
|
393
393
|
end
|
394
394
|
end
|
395
395
|
end # IndexTableFor
|