E56D Merge branch 'master' into config-favicon · activeadmin/activeadmin@9717276 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9717276

Browse files
authored
Merge branch 'master' into config-favicon
2 parents 2210b24 + 434f1ec commit 9717276

File tree

14 files changed

+69
-21
lines changed

14 files changed

+69
-21
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
activeadmin (4.0.0.beta10)
4+
activeadmin (4.0.0.beta11)
55
arbre (~> 2.0)
66
csv
77
formtastic (>= 3.1)

UPGRADING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ ActiveAdmin v4 uses TailwindCSS. It has **mobile web, dark mode and RTL support*
88

99
These instructions assume the `cssbundling-rails` and `importmap-rails` gems are already installed and you have run their install commands in your app. If you haven't done so, please do before continuing.
1010

11-
Update your `Gemfile` with `gem "activeadmin", "4.0.0.beta10"` and then run `gem install activeadmin --pre`.
11+
Update your `Gemfile` with `gem "activeadmin", "4.0.0.beta11"` and then run `gem install activeadmin --pre`.
1212

1313
Now, run `rails generate active_admin:assets` to replace the old assets with the new files.
1414

1515
Then add the npm package and update the `build:css` script.
1616

1717
```
18-
yarn add @activeadmin/activeadmin@4.0.0-beta10
18+
yarn add @activeadmin/activeadmin@4.0.0-beta11
1919
npm pkg set scripts.build:css="tailwindcss -i ./app/assets/stylesheets/active_admin.css -o ./app/assets/builds/active_admin.css --minify -c tailwind-active_admin.config.js"
2020
```
2121

app/controllers/active_admin/resource_controller/decorators.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def self.wrap(decorator)
6161
def self.wrap!(parent, name)
6262
::Class.new parent do
6363
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,
6565
:except, :find_each, :ransack, to: :object
6666

6767
define_singleton_method(:name) { name }

app/helpers/active_admin/display_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ def boolean_attr?(resource, attr, value)
108108
when TrueClass, FalseClass
109109
true
11 4B92 0110
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)
113113
end
114114
end
115115
end

gemfiles/rails_61/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ../..
33
specs:
4-
activeadmin (4.0.0.beta10)
4+
activeadmin (4.0.0.beta11)
55
arbre (~> 2.0)
66
csv
77
formtastic (>= 3.1)

gemfiles/rails_70/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ../..
33
specs:
4-
activeadmin (4.0.0.beta10)
4+
activeadmin (4.0.0.beta11)
55
arbre (~> 2.0)
66
csv
77
formtastic (>= 3.1)

gemfiles/rails_71/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ../..
33
specs:
4-
activeadmin (4.0.0.beta10)
4+
activeadmin (4.0.0.beta11)
55
arbre (~> 2.0)
66
csv
77
formtastic (>= 3.1)

lib/active_admin/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# frozen_string_literal: true
22
module ActiveAdmin
3-
VERSION = "4.0.0.beta10"
3+
VERSION = "4.0.0.beta11"
44
end

lib/active_admin/views/components/paginated_collection.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ def build_pagination
102102
# you pass in the :total_pages option. We issue a query to determine
103103
# if there is another page or not, but the limit/offset make this
104104
# query fast.
105-
offset = @collection.offset(@collection.current_page * @collection.limit_value).limit(1).count
105+
offset_scope = @collection.offset(@collection.current_page * @collection.limit_value)
106+
# Support array collections. Kaminari::PaginatableArray does not respond to except
107+
offset_scope = offset_scope.except(:select, :order) if offset_scope.respond_to?(:except)
108+
offset = offset_scope.limit(1).count
106109
options[:total_pages] = @collection.current_page + offset
107110
options[:right] = 0
108111
end

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@activeadmin/activeadmin",
3-
"version": "4.0.0-beta10",
3+
"version": "4.0.0-beta11",
44
"description": "The administration framework for Ruby on Rails.",
55
"main": "dist/active_admin.js",
66
"type": "module",

0 commit comments

Comments
 (0)
0