activeadmin 3.2.3 → 3.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd51d7cc81eac3cbb01358076ca98368ccd5879f96dd9dfaed3f4e6b5c511648
4
- data.tar.gz: 95913536dfd3ccf746a0848545b81685ead621cd2536776ede879a9b02196058
3
+ metadata.gz: 99b9db7d0e925b5764b5141008734fa147cbb742e0f3e62476a7dcc8fb1f0485
4
+ data.tar.gz: b0f5aa9c2dc4c1923e7cac2b893a0a2d871ddb67cdec7183dc7886b5adea97e6
5
5
  SHA512:
6
- metadata.gz: 0b296e6597a76172815063ca7b63ba359308b9a13c26874b6ea6b746dbd25bb8d6929c4da2f1b8682dfbd998cc7a752c73d2eca70b356fdfad8362294273aac9
7
- data.tar.gz: ac965d5a5b2308a064e0e47816c1739f8482570ce926feb72fcf1031b12ac1e738719571faae48d03128c1d8af790e74e47c04e7f62484e791cd654749373417
6
+ metadata.gz: efa9d0ded1ac54f680ab3409019cf425a578d18bd89c73b4a39cc219cbbb50e25abeb294d771724394648432704e5bbcb10729ea5aa4e89150c00c3de876755d
7
+ data.tar.gz: c85cd6bfc4f4cbaa4345d960c8c797ab4066d58f131116b79100195edd6e269ac8f1867441442801c7a7eea4cefebe36506db373284d28b7ee48fa826d05bdcc
data/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.2.5 [☰](https://github.com/activeadmin/activeadmin/compare/v3.2.4..v3.2.5)
6
+
7
+ ### Enhancements
8
+
9
+ * Backport Add favicon to template app to fix Rails 7.2 test suite run [#8468] by [@mgrunberg]
10
+ * Backport Use attribute_types instead of columns_hash to determine type [#8469] by [@mgrunberg]
11
+ * Backport Optimize count query for pagination_total: false option [#8470] by [@mgrunberg]
12
+
13
+ ### Bug Fixes
14
+
15
+ * Restore inner span tag to form inputs legend [#8467] by [@denisahearn]
16
+
17
+ ## 3.2.4 [☰](https://github.com/activeadmin/activeadmin/compare/v3.2.3..v3.2.4)
18
+
19
+ ### Enhancements
20
+
21
+ * Test against Rails 7.2 [#8434] by [@mgrunberg]
22
+
23
+ ### Bug Fixes
24
+
25
+ * Backport Improve form f.inputs attributes rendering [#8446] by [@amiel]
26
+
5
27
  ## 3.2.3 [☰](https://github.com/activeadmin/activeadmin/compare/v3.2.2..v3.2.3)
6
28
 
7
29
  ### Enhancements
@@ -932,6 +954,12 @@ Please check [0-6-stable] for previous changes.
932
954
  [#8349]: https://github.com/activeadmin/activeadmin/pull/8349
933
955
  [#8405]: https://github.com/activeadmin/activeadmin/pull/8405
934
956
  [#8412]: https://github.com/activeadmin/activeadmin/pull/8412
957
+ [#8434]: https://github.com/activeadmin/activeadmin/pull/8434
958
+ [#8446]: https://github.com/activeadmin/activeadmin/pull/8446
959
+ [#8467]: https://github.com/activeadmin/activeadmin/pull/8467
960
+ [#8468]: https://github.com/activeadmin/activeadmin/pull/8468
961
+ [#8469]: https://github.com/activeadmin/activeadmin/pull/8469
962
+ [#8470]: https://github.com/activeadmin/activeadmin/pull/8470
935
963
 
936
964
  [@1000ship]: https://github.com/1000ship
937
965
  [@5t111111]: https://github.com/5t111111
@@ -960,6 +988,7 @@ Please check [0-6-stable] for previous changes.
960
988
  [@craigmcnamara]: https://github.com/craigmcnamara
961
989
  [@DanielHeath]: https://github.com/DanielHeath
962
990
  [@deivid-rodriguez]: https://github.com/deivid-rodriguez
991
+ [@denisahearn]: https://github.com/denisahearn
963
992
  [@dennisvdvliet]: https://github.com/dennisvdvliet
964
993
  [@dhyegofernando]: https://github.com/dhyegofernando
965
994
  [@dkniffin]: https://github.com/dkniffin
@@ -61,7 +61,7 @@ module ActiveAdmin
61
61
  def self.wrap!(parent, name)
62
62
  ::Class.new parent do
63
63
  delegate :reorder, :page, :current_page, :total_pages, :limit_value,
64
- :total_count, :total_pages, :offset, :to_key, :group_values,
64
+ :total_count, :offset, :to_key, :group_values,
65
65
  :except, :find_each, :ransack, to: :object
66
66
 
67
67
  define_singleton_method(:name) { name }
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ActiveAdmin
3
- VERSION = "3.2.3"
3
+ VERSION = "3.2.5"
4
4
  end
@@ -108,8 +108,8 @@ module ActiveAdmin
108
108
  when TrueClass, FalseClass
109
109
  true
110
110
  else
111
- if resource.class.respond_to? :columns_hash
112
- column = resource.class.columns_hash[attr.to_s] and column.type == :boolean
111
+ if resource.class.respond_to? :attribute_types
112
+ resource.class.attribute_types[attr.to_s].is_a?(ActiveModel::Type::Boolean)
113
113
  end
114
114
  end
115
115
  end
@@ -127,12 +127,24 @@ module ActiveAdmin
127
127
  html_options[:class] ||= "inputs"
128
128
  legend = args.shift if args.first.is_a?(::String)
129
129
  legend = html_options.delete(:name) if html_options.key?(:name)
130
- legend_tag = legend ? "<legend><span>#{ERB::Util.html_escape(legend)}</span></legend>" : ""
131
- fieldset_attrs = html_options.map { |k, v| %Q{#{k}="#{v}"} }.join(" ")
130
+ legend_tag = legend ? helpers.tag.legend(helpers.tag.span(legend), class: "fieldset-title") : ""
131
+ fieldset_attrs = tag_attributes html_options
132
132
  @opening_tag = "<fieldset #{fieldset_attrs}>#{legend_tag}<ol>"
133
133
  @closing_tag = "</ol></fieldset>"
134
134
  super(*(args << html_options), &block)
135
135
  end
136
+
137
+ private
138
+
139
+ def tag_attributes(html_options)
140
+ if Rails::VERSION::MAJOR <= 6
141
+ # Reimplement tag.attributes to backport support for Rails 6.1.
142
+ # TODO: this can be removed when support for Rails 6.x is dropped
143
+ helpers.tag.tag_options(html_options.to_h).to_s.strip.html_safe
144
+ else
145
+ helpers.tag.attributes html_options
146
+ end
147
+ end
136
148
  end
137
149
 
138
150
  class SemanticActionsProxy < FormtasticProxy
@@ -103,7 +103,10 @@ module ActiveAdmin
103
103
  # you pass in the :total_pages option. We issue a query to determine
104
104
  # if there is another page or not, but the limit/offset make this
105
105
  # query fast.
106
- offset = collection.offset(collection.current_page * collection.limit_value).limit(1).count
106
+ offset_scope = collection.offset(collection.current_page * collection.limit_value)
107
+ # Support array collections. Kaminari::PaginatableArray does not respond to except
108
+ offset_scope = offset_scope.except(:select, :order) if offset_scope.respond_to?(:except)
109
+ offset = offset_scope.limit(1).count
107
110
  options[:total_pages] = collection.current_page + offset
108
111
  options[:right] = 0
109
112
  end
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: 3.2.3
4
+ version: 3.2.5
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: 2024-08-02 00:00:00.000000000 Z
18
+ date: 2024-09-05 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: arbre
@@ -533,7 +533,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
533
533
  - !ruby/object:Gem::Version
534
534
  version: '0'
535
535
  requirements: []
536
- rubygems_version: 3.5.11
536
+ rubygems_version: 3.5.16
537
537
  signing_key:
538
538
  specification_version: 4
539
539
  summary: Active Admin is a Ruby on Rails plugin for generating administration style