diff --git a/test_app/blog/.ruby-version b/test_app/blog/.ruby-version index 37c2961..b347b11 100644 --- a/test_app/blog/.ruby-version +++ b/test_app/blog/.ruby-version @@ -1 +1 @@ -2.7.2 +3.2.3 diff --git a/test_app/blog/Gemfile b/test_app/blog/Gemfile index ad579d9..0135501 100644 --- a/test_app/blog/Gemfile +++ b/test_app/blog/Gemfile @@ -1,10 +1,10 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "2.7.2" +ruby "3.2.3" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" -gem "rails", "~> 7.0.4", ">= 7.0.4.3" +gem "rails", "~> 7.0.8", ">= 7.0.4.3" # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] gem "sprockets-rails" @@ -49,14 +49,18 @@ gem "bootsnap", require: false # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] # gem "image_processing", "~> 1.2" -gem 'activeadmin' +gem 'activeadmin', "~> 2.9" + +gem 'turbolinks', "~> 5.2.1" # Plus integrations with: gem 'devise' gem 'cancancan' gem 'draper' gem 'pundit' -gem 'activeadmin-ajax_filter', path: '../..' +gem 'activeadmin-ajax_filter' #, path: '../..' +gem 'activeadmin-async_panel' +gem 'ransack', '~> 3.2.1' gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main' group :development, :test do diff --git a/test_app/blog/Gemfile.lock b/test_app/blog/Gemfile.lock index 3fd6c83..111eb1d 100644 --- a/test_app/blog/Gemfile.lock +++ b/test_app/blog/Gemfile.lock @@ -6,64 +6,55 @@ GIT faker (3.2.0) i18n (>= 1.8.11, < 2) -PATH - remote: ../.. - specs: - activeadmin-ajax_filter (0.6.0) - activeadmin (>= 1.0) - coffee-rails (>= 4.1.0) - rails (>= 7.0) - selectize-rails (>= 0.12.6) - GEM remote: https://rubygems.org/ specs: - actioncable (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + actioncable (7.0.8.6) + actionpack (= 7.0.8.6) + activesupport (= 7.0.8.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + actionmailbox (7.0.8.6) + actionpack (= 7.0.8.6) + activejob (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.4.3) - actionpack (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activesupport (= 7.0.4.3) + actionmailer (7.0.8.6) + actionpack (= 7.0.8.6) + actionview (= 7.0.8.6) + activejob (= 7.0.8.6) + activesupport (= 7.0.8.6) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.4.3) - actionview (= 7.0.4.3) - activesupport (= 7.0.4.3) - rack (~> 2.0, >= 2.2.0) + actionpack (7.0.8.6) + actionview (= 7.0.8.6) + activesupport (= 7.0.8.6) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4.3) - actionpack (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + actiontext (7.0.8.6) + actionpack (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4.3) - activesupport (= 7.0.4.3) + actionview (7.0.8.6) + activesupport (= 7.0.8.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activeadmin (2.13.1) + activeadmin (2.14.0) arbre (~> 1.2, >= 1.2.1) formtastic (>= 3.1, < 5.0) formtastic_i18n (~> 0.4) @@ -72,40 +63,49 @@ GEM kaminari (~> 1.0, >= 1.2.1) railties (>= 6.1, < 7.1) ransack (>= 2.1.1, < 4) - activejob (7.0.4.3) - activesupport (= 7.0.4.3) + activeadmin-ajax_filter (0.7.0) + activeadmin (>= 1.0) + coffee-rails (>= 4.1.0) + rails (>= 7.0) + selectize-rails (>= 0.12.6) + activeadmin-async_panel (0.3.0) + activeadmin (>= 1.0) + coffee-rails (>= 4.1) + rails (>= 7.0) + activejob (7.0.8.6) + activesupport (= 7.0.8.6) globalid (>= 0.3.6) - activemodel (7.0.4.3) - activesupport (= 7.0.4.3) + activemodel (7.0.8.6) + activesupport (= 7.0.8.6) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (7.0.4.3) - activemodel (= 7.0.4.3) - activesupport (= 7.0.4.3) - activestorage (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activesupport (= 7.0.4.3) + activerecord (7.0.8.6) + activemodel (= 7.0.8.6) + activesupport (= 7.0.8.6) + activestorage (7.0.8.6) + actionpack (= 7.0.8.6) + activejob (= 7.0.8.6) + activerecord (= 7.0.8.6) + activesupport (= 7.0.8.6) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.4.3) + activesupport (7.0.8.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) - arbre (1.5.0) - activesupport (>= 3.0.0, < 7.1) - ruby2_keywords (>= 0.0.2, < 1.0) + arbre (1.7.0) + activesupport (>= 3.0.0) + ruby2_keywords (>= 0.0.2) bcrypt (3.1.18) bindex (0.8.1) bootsnap (1.16.0) msgpack (~> 1.2) - builder (3.2.4) + builder (3.3.0) cancancan (3.5.0) capybara (3.39.0) addressable @@ -123,9 +123,9 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.2.2) + concurrent-ruby (1.3.4) crass (1.0.6) - date (3.3.3) + date (3.4.0) debug (1.7.2) irb (>= 1.5.0) reline (>= 0.3.1) @@ -142,34 +142,34 @@ GEM activesupport (>= 5.0) request_store (>= 1.0) ruby2_keywords - erubi (1.12.0) - execjs (2.8.1) + erubi (1.13.0) + execjs (2.10.0) ffi (1.15.5) formtastic (4.0.0) actionpack (>= 5.2.0) formtastic_i18n (0.7.0) - globalid (1.1.0) - activesupport (>= 5.0) - has_scope (0.8.1) + globalid (1.2.1) + activesupport (>= 6.1) + has_scope (0.8.2) actionpack (>= 5.2) activesupport (>= 5.2) - i18n (1.12.0) + i18n (1.14.6) concurrent-ruby (~> 1.0) importmap-rails (1.1.6) actionpack (>= 6.0.0) railties (>= 6.0.0) - inherited_resources (1.13.1) - actionpack (>= 5.2, < 7.1) - has_scope (~> 0.6) - railties (>= 5.2, < 7.1) - responders (>= 2, < 4) + inherited_resources (1.14.0) + actionpack (>= 6.0) + has_scope (>= 0.6) + railties (>= 6.0) + responders (>= 2) io-console (0.6.0) irb (1.6.4) reline (>= 0.3.0) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - jquery-rails (4.5.1) + jquery-rails (4.6.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) @@ -185,33 +185,33 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) - loofah (2.20.0) + loofah (2.23.1) crass (~> 1.0.2) - nokogiri (>= 1.5.9) + nokogiri (>= 1.12.0) mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) matrix (0.4.2) - method_source (1.0.0) - mini_mime (1.1.2) - mini_portile2 (2.8.1) - minitest (5.18.0) + method_source (1.1.0) + mini_mime (1.1.5) + mini_portile2 (2.8.8) + minitest (5.25.2) msgpack (1.7.0) - net-imap (0.3.4) + net-imap (0.5.1) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.5.0) net-protocol - nio4r (2.5.9) - nokogiri (1.14.3) - mini_portile2 (~> 2.8.0) + nio4r (2.7.4) + nokogiri (1.16.7) + mini_portile2 (~> 2.8.2) racc (~> 1.4) orm_adapter (0.5.0) public_suffix (5.0.1) @@ -219,37 +219,39 @@ GEM nio4r (~> 2.0) pundit (2.3.0) activesupport (>= 3.0.0) - racc (1.6.2) - rack (2.2.7) + racc (1.8.1) + rack (2.2.10) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.4.3) - actioncable (= 7.0.4.3) - actionmailbox (= 7.0.4.3) - actionmailer (= 7.0.4.3) - actionpack (= 7.0.4.3) - actiontext (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activemodel (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + rails (7.0.8.6) + actioncable (= 7.0.8.6) + actionmailbox (= 7.0.8.6) + actionmailer (= 7.0.8.6) + actionpack (= 7.0.8.6) + actiontext (= 7.0.8.6) + actionview (= 7.0.8.6) + activejob (= 7.0.8.6) + activemodel (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) bundler (>= 1.15.0) - railties (= 7.0.4.3) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + railties (= 7.0.8.6) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.5.0) - loofah (~> 2.19, >= 2.19.1) - railties (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.0.8.6) + actionpack (= 7.0.8.6) + activesupport (= 7.0.8.6) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) - rake (13.0.6) + rake (13.2.1) ransack (3.2.1) activerecord (>= 6.1.5) activesupport (>= 6.1.5) @@ -259,7 +261,7 @@ GEM io-console (~> 0.5) request_store (1.5.1) rack (>= 1.4) - responders (3.1.0) + responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) rexml (3.2.5) @@ -283,12 +285,15 @@ GEM mini_portile2 (~> 2.8.0) stimulus-rails (1.2.1) railties (>= 6.0.0) - thor (1.2.1) - timeout (0.3.2) + thor (1.3.2) + timeout (0.4.2) turbo-rails (1.4.0) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) + turbolinks (5.2.1) + turbolinks-source (~> 5.2) + turbolinks-source (5.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) warden (1.2.9) @@ -303,19 +308,20 @@ GEM rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0) websocket (1.2.9) - websocket-driver (0.7.5) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.7) + zeitwerk (2.7.1) PLATFORMS ruby DEPENDENCIES - activeadmin - activeadmin-ajax_filter! + activeadmin (~> 2.9) + activeadmin-ajax_filter + activeadmin-async_panel bootsnap cancancan capybara @@ -327,19 +333,21 @@ DEPENDENCIES jbuilder puma (~> 5.0) pundit - rails (~> 7.0.4, >= 7.0.4.3) + rails (~> 7.0.8, >= 7.0.4.3) + ransack (~> 3.2.1) sassc selenium-webdriver sprockets-rails sqlite3 (~> 1.4) stimulus-rails turbo-rails + turbolinks (~> 5.2.1) tzinfo-data web-console webdrivers RUBY VERSION - ruby 2.7.2p137 + ruby 3.2.3p157 BUNDLED WITH 2.1.4 diff --git a/test_app/blog/app/admin/subcategories.rb b/test_app/blog/app/admin/subcategories.rb index 95f61f2..947b376 100644 --- a/test_app/blog/app/admin/subcategories.rb +++ b/test_app/blog/app/admin/subcategories.rb @@ -5,4 +5,14 @@ permit_params :id, :name, :category_id config.sort_order = 'id_asc' config.per_page = 3 -end \ No newline at end of file + + show do |subcategory| + panel 'Async panel', class: 'async-panel', 'data-url' => panel_admin_subcategory_path(subcategory) + end + + member_action :panel do + @data = 'Loaded async' + + render layout: false + end +end diff --git a/test_app/blog/app/assets/javascripts/active_admin.js b/test_app/blog/app/assets/javascripts/active_admin.js index 745df93..07a8554 100644 --- a/test_app/blog/app/assets/javascripts/active_admin.js +++ b/test_app/blog/app/assets/javascripts/active_admin.js @@ -1,4 +1,6 @@ +//= require turbolinks //= require active_admin/base //= require selectize //= require activeadmin-ajax_filter +//= require activeadmin-async_panel diff --git a/test_app/blog/app/views/admin/subcategories/panel.html.arb b/test_app/blog/app/views/admin/subcategories/panel.html.arb new file mode 100644 index 0000000..060129e --- /dev/null +++ b/test_app/blog/app/views/admin/subcategories/panel.html.arb @@ -0,0 +1 @@ +span(data)