administrate-field-nested_has_many 1.3.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +1 -1
  3. data/.ruby-version +1 -1
  4. data/Appraisals +2 -10
  5. data/CHANGELOG.md +23 -0
  6. data/CODE_OF_CONDUCT.md +6 -0
  7. data/CONTRIBUTING.md +38 -0
  8. data/LICENSE.md +21 -0
  9. data/README.md +38 -1
  10. data/SECURITY.md +16 -0
  11. data/administrate-field-nested_has_many.gemspec +2 -3
  12. data/app/views/fields/nested_has_many/_show.html.erb +35 -6
  13. data/bin/build-changelog +24 -0
  14. data/bin/setup +13 -0
  15. data/config/locales/administrate-field-nested_has_many.de.yml +7 -0
  16. data/config/locales/administrate-field-nested_has_many.fr.yml +7 -0
  17. data/gemfiles/{administrate_0.13.gemfile → administrate_0.19.gemfile} +1 -1
  18. data/gemfiles/administrate_0.19.gemfile.lock +260 -0
  19. data/lib/administrate/field/nested_has_many.rb +28 -14
  20. data/spec/dummy/Rakefile +1 -1
  21. data/spec/dummy/app/dashboards/school_dashboard.rb +1 -1
  22. data/spec/dummy/bin/rails +2 -2
  23. data/spec/dummy/bin/rake +2 -2
  24. data/spec/dummy/bin/setup +6 -9
  25. data/spec/dummy/config/application.rb +12 -9
  26. data/spec/dummy/config/boot.rb +1 -1
  27. data/spec/dummy/config/environment.rb +1 -1
  28. data/spec/dummy/config/environments/development.rb +16 -4
  29. data/spec/dummy/config/environments/test.rb +19 -6
  30. data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -3
  31. data/spec/dummy/config/initializers/content_security_policy.rb +3 -0
  32. data/spec/dummy/config/initializers/filter_parameter_logging.rb +3 -1
  33. data/spec/dummy/config/initializers/permissions_policy.rb +11 -0
  34. data/spec/dummy/config/locales/en.yml +1 -1
  35. data/spec/dummy/config/puma.rb +13 -4
  36. data/spec/dummy/config.ru +2 -1
  37. data/spec/dummy/db/schema.rb +10 -6
  38. data/spec/features/has_many_spec.rb +10 -0
  39. metadata +21 -41
  40. data/app/views/fields/nested_has_many/_show_current.html.erb +0 -44
  41. data/app/views/fields/nested_has_many/_show_old.html.erb +0 -36
  42. data/gemfiles/administrate_0.10.gemfile +0 -8
  43. data/gemfiles/administrate_0.10.gemfile.lock +0 -214
  44. data/gemfiles/administrate_0.13.gemfile.lock +0 -207
  45. data/gemfiles/administrate_master.gemfile +0 -8
  46. data/gemfiles/administrate_master.gemfile.lock +0 -219
  47. data/spec/dummy/app/mailers/application_mailer.rb +0 -4
  48. data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
  49. data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
  50. data/spec/dummy/config/cable.yml +0 -10
  51. data/spec/dummy/config/storage.yml +0 -34
data/spec/dummy/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
- require_relative 'config/application'
4
+ require_relative "config/application"
5
5
 
6
6
  Rails.application.load_tasks
@@ -10,7 +10,7 @@ class SchoolDashboard < Administrate::BaseDashboard
10
10
  ATTRIBUTE_TYPES = {
11
11
  id: Field::Number,
12
12
  name: Field::String,
13
- students: Field::NestedHasMany.with_options(class_name: "Foo::Student"),
13
+ students: Field::NestedHasMany,
14
14
  created_at: Field::DateTime,
15
15
  updated_at: Field::DateTime,
16
16
  }.freeze
data/spec/dummy/bin/rails CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
  APP_PATH = File.expand_path('../config/application', __dir__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
3
+ require_relative "../config/boot"
4
+ require "rails/commands"
data/spec/dummy/bin/rake CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
2
+ require_relative "../config/boot"
3
+ require "rake"
4
4
  Rake.application.run
data/spec/dummy/bin/setup CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- require 'fileutils'
3
- include FileUtils
2
+ require "fileutils"
4
3
 
5
4
  # path to your application root.
6
5
  APP_ROOT = File.expand_path('..', __dir__)
@@ -9,24 +8,22 @@ def system!(*args)
9
8
  system(*args) || abort("\n== Command #{args} failed ==")
10
9
  end
11
10
 
12
- chdir APP_ROOT do
13
- # This script is a starting point to setup your application.
11
+ FileUtils.chdir APP_ROOT do
12
+ # This script is a way to set up or update your development environment automatically.
13
+ # This script is idempotent, so that you can run it at any time and get an expectable outcome.
14
14
  # Add necessary setup steps to this file.
15
15
 
16
16
  puts '== Installing dependencies =='
17
17
  system! 'gem install bundler --conservative'
18
18
  system('bundle check') || system!('bundle install')
19
19
 
20
- # Install JavaScript dependencies if using Yarn
21
- # system('bin/yarn')
22
-
23
20
  # puts "\n== Copying sample files =="
24
21
  # unless File.exist?('config/database.yml')
25
- # cp 'config/database.yml.sample', 'config/database.yml'
22
+ # FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
26
23
  # end
27
24
 
28
25
  puts "\n== Preparing database =="
29
- system! 'bin/rails db:setup'
26
+ system! 'bin/rails db:prepare'
30
27
 
31
28
  puts "\n== Removing old logs and tempfiles =="
32
29
  system! 'bin/rails log:clear tmp:clear'
@@ -1,18 +1,21 @@
1
- require_relative 'boot'
1
+ require_relative "boot"
2
2
 
3
- require 'rails/all'
3
+ require "rails/all"
4
4
 
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
5
7
  Bundler.require(*Rails.groups)
6
8
 
7
9
  module Dummy
8
10
  class Application < Rails::Application
9
- # Initialize configuration defaults for originally generated Rails version.
10
- config.load_defaults 5.2
11
+ config.load_defaults Rails::VERSION::STRING.to_f
11
12
 
12
- # Settings in config/environments/* take precedence over those specified here.
13
- # Application configuration can go into files in config/initializers
14
- # -- all .rb files in that directory are automatically loaded after loading
15
- # the framework and any gems in your application.
13
+ # Configuration for the application, engines, and railties goes here.
14
+ #
15
+ # These settings can be overridden in specific environments using the files
16
+ # in config/environments, which are processed later.
17
+ #
18
+ # config.time_zone = "Central Time (US & Canada)"
19
+ # config.eager_load_paths << Rails.root.join("extras")
16
20
  end
17
21
  end
18
-
@@ -1,5 +1,5 @@
1
1
  # Set up gems listed in the Gemfile.
2
2
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3
3
 
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
4
+ require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
5
5
  $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
@@ -1,5 +1,5 @@
1
1
  # Load the Rails application.
2
- require_relative 'application'
2
+ require_relative "application"
3
3
 
4
4
  # Initialize the Rails application.
5
5
  Rails.application.initialize!
@@ -1,8 +1,10 @@
1
+ require "active_support/core_ext/integer/time"
2
+
1
3
  Rails.application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
+ # In the development environment your application's code is reloaded any time
7
+ # it changes. This slows down response time but is perfect for development
6
8
  # since you don't have to restart the web server when you make code changes.
7
9
  config.cache_classes = false
8
10
 
@@ -16,6 +18,7 @@ Rails.application.configure do
16
18
  # Run rails dev:cache to toggle caching.
17
19
  if Rails.root.join('tmp', 'caching-dev.txt').exist?
18
20
  config.action_controller.perform_caching = true
21
+ config.action_controller.enable_fragment_cache_logging = true
19
22
 
20
23
  config.cache_store = :memory_store
21
24
  config.public_file_server.headers = {
@@ -30,6 +33,12 @@ Rails.application.configure do
30
33
  # Print deprecation notices to the Rails logger.
31
34
  config.active_support.deprecation = :log
32
35
 
36
+ # Raise exceptions for disallowed deprecations.
37
+ config.active_support.disallowed_deprecation = :raise
38
+
39
+ # Tell Active Support which deprecation messages to disallow.
40
+ config.active_support.disallowed_deprecation_warnings = []
41
+
33
42
  # Raise an error on page load if there are pending migrations.
34
43
  config.active_record.migration_error = :page_load
35
44
 
@@ -44,8 +53,11 @@ Rails.application.configure do
44
53
  # Suppress logger output for asset requests.
45
54
  config.assets.quiet = true
46
55
 
47
- # Raises error for missing translations
48
- # config.action_view.raise_on_missing_translations = true
56
+ # Raises error for missing translations.
57
+ # config.i18n.raise_on_missing_translations = true
58
+
59
+ # Annotate rendered view with file names.
60
+ # config.action_view.annotate_rendered_view_with_filenames = true
49
61
 
50
62
  # Use an evented file watcher to asynchronously detect changes in source code,
51
63
  # routes, locales, etc. This feature depends on the listen gem.
@@ -1,10 +1,13 @@
1
+ require "active_support/core_ext/integer/time"
2
+
3
+ # The test environment is used exclusively to run your application's
4
+ # test suite. You never need to work with it otherwise. Remember that
5
+ # your test database is "scratch space" for the test suite and is wiped
6
+ # and recreated between test runs. Don't rely on the data there!
7
+
1
8
  Rails.application.configure do
2
9
  # Settings specified here will take precedence over those in config/application.rb.
3
10
 
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
11
  config.cache_classes = true
9
12
 
10
13
  # Do not eager load code on boot. This avoids loading your whole application
@@ -21,6 +24,7 @@ Rails.application.configure do
21
24
  # Show full error reports and disable caching.
22
25
  config.consider_all_requests_local = true
23
26
  config.action_controller.perform_caching = false
27
+ config.cache_store = :null_store
24
28
 
25
29
  # Raise exceptions instead of rendering exception templates.
26
30
  config.action_dispatch.show_exceptions = false
@@ -31,6 +35,15 @@ Rails.application.configure do
31
35
  # Print deprecation notices to the stderr.
32
36
  config.active_support.deprecation = :stderr
33
37
 
34
- # Raises error for missing translations
35
- # config.action_view.raise_on_missing_translations = true
38
+ # Raise exceptions for disallowed deprecations.
39
+ config.active_support.disallowed_deprecation = :raise
40
+
41
+ # Tell Active Support which deprecation messages to disallow.
42
+ config.active_support.disallowed_deprecation_warnings = []
43
+
44
+ # Raises error for missing translations.
45
+ # config.i18n.raise_on_missing_translations = true
46
+
47
+ # Annotate rendered view with file names.
48
+ # config.action_view.annotate_rendered_view_with_filenames = true
36
49
  end
@@ -1,7 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
4
+ # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
5
5
 
6
- # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
- # Rails.backtrace_cleaner.remove_silencers!
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
7
+ # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
8
+ Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]
@@ -19,6 +19,9 @@
19
19
  # If you are using UJS then enable automatic nonce generation
20
20
  # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
21
21
 
22
+ # Set the nonce only to specific directives
23
+ # Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
24
+
22
25
  # Report CSP violations to a specified URI
23
26
  # For further information see the following documentation:
24
27
  # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
@@ -1,4 +1,6 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
4
+ Rails.application.config.filter_parameters += [
5
+ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
6
+ ]
@@ -0,0 +1,11 @@
1
+ # Define an application-wide HTTP permissions policy. For further
2
+ # information see https://developers.google.com/web/updates/2018/06/feature-policy
3
+ #
4
+ # Rails.application.config.permissions_policy do |f|
5
+ # f.camera :none
6
+ # f.gyroscope :none
7
+ # f.microphone :none
8
+ # f.usb :none
9
+ # f.fullscreen :self
10
+ # f.payment :self, "https://secure.example.com"
11
+ # end
@@ -27,7 +27,7 @@
27
27
  # 'true': 'foo'
28
28
  #
29
29
  # To learn more, please read the Rails Internationalization guide
30
- # available at http://guides.rubyonrails.org/i18n.html.
30
+ # available at https://guides.rubyonrails.org/i18n.html.
31
31
 
32
32
  en:
33
33
  hello: "Hello world"
@@ -4,19 +4,28 @@
4
4
  # the maximum value specified for Puma. Default is set to 5 threads for minimum
5
5
  # and maximum; this matches the default thread size of Active Record.
6
6
  #
7
- threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
8
- threads threads_count, threads_count
7
+ max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
8
+ min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
9
+ threads min_threads_count, max_threads_count
10
+
11
+ # Specifies the `worker_timeout` threshold that Puma will use to wait before
12
+ # terminating a worker in development environments.
13
+ #
14
+ worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
9
15
 
10
16
  # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
11
17
  #
12
- port ENV.fetch("PORT") { 3000 }
18
+ port ENV.fetch("PORT") { 3000 }
13
19
 
14
20
  # Specifies the `environment` that Puma will run in.
15
21
  #
16
22
  environment ENV.fetch("RAILS_ENV") { "development" }
17
23
 
24
+ # Specifies the `pidfile` that Puma will use.
25
+ pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
26
+
18
27
  # Specifies the number of `workers` to boot in clustered mode.
19
- # Workers are forked webserver processes. If using threads and workers together
28
+ # Workers are forked web server processes. If using threads and workers together
20
29
  # the concurrency of the application would be max `threads` * `workers`.
21
30
  # Workers do not work on JRuby or Windows (both of which do not support
22
31
  # processes).
data/spec/dummy/config.ru CHANGED
@@ -1,5 +1,6 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require_relative 'config/environment'
3
+ require_relative "config/environment"
4
4
 
5
5
  run Rails.application
6
+ Rails.application.load_server
@@ -2,16 +2,19 @@
2
2
  # of editing this file, please use the migrations feature of Active Record to
3
3
  # incrementally modify your database, and then regenerate this schema definition.
4
4
  #
5
- # Note that this schema.rb definition is the authoritative source for your
6
- # database schema. If you need to create the application database on another
7
- # system, you should be using db:schema:load, not running all the migrations
8
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
- # you'll amass, the slower it'll run and the greater likelihood for issues).
5
+ # This file is the source Rails uses to define your schema when running `bin/rails
6
+ # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
+ # be faster and is potentially less error prone than running all of your
8
+ # migrations from scratch. Old migrations may fail to apply correctly if those
9
+ # migrations use external dependencies or application code.
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
13
  ActiveRecord::Schema.define(version: 2018_09_07_104703) do
14
14
 
15
+ # These are extensions that must be enabled in order to support this database
16
+ enable_extension "plpgsql"
17
+
15
18
  create_table "schools", force: :cascade do |t|
16
19
  t.string "name"
17
20
  t.datetime "created_at", null: false
@@ -20,10 +23,11 @@ ActiveRecord::Schema.define(version: 2018_09_07_104703) do
20
23
 
21
24
  create_table "students", force: :cascade do |t|
22
25
  t.string "name"
23
- t.integer "school_id"
26
+ t.bigint "school_id"
24
27
  t.datetime "created_at", null: false
25
28
  t.datetime "updated_at", null: false
26
29
  t.index ["school_id"], name: "index_students_on_school_id"
27
30
  end
28
31
 
32
+ add_foreign_key "students", "schools"
29
33
  end
@@ -19,6 +19,16 @@ feature "Has many" do
19
19
  expect(page).to have_content("John Doe")
20
20
  end
21
21
 
22
+ scenario "pagination" do
23
+ FactoryBot.create_list(:student, 10, school: school)
24
+
25
+ visit admin_school_path(school)
26
+
27
+ expect(page.html).to have_css("nav[role=navigation]")
28
+ expect(page.html).to have_content("Last")
29
+ expect(page.html).to have_content("Next")
30
+ end
31
+
22
32
  scenario "new" do
23
33
  visit new_admin_school_path
24
34
  expect(page).to have_content("New Schools")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administrate-field-nested_has_many
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Charlton
@@ -9,28 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-07-02 00:00:00.000000000 Z
12
+ date: 2024-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: administrate
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '0.8'
20
+ version: '0.15'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '1'
23
+ version: 0.20.0
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - ">"
28
+ - - ">="
29
29
  - !ruby/object:Gem::Version
30
- version: '0.8'
30
+ version: '0.15'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '1'
33
+ version: 0.20.0
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: cocoon
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -149,20 +149,6 @@ dependencies:
149
149
  - - ">="
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
- - !ruby/object:Gem::Dependency
153
- name: sqlite3
154
- requirement: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - ">="
157
- - !ruby/object:Gem::Version
158
- version: '0'
159
- type: :development
160
- prerelease: false
161
- version_requirements: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - ">="
164
- - !ruby/object:Gem::Version
165
- version: '0'
166
152
  description: Plugin for nested has_many forms in Administrate
167
153
  email:
168
154
  - nick@nickcharlton.net
@@ -176,9 +162,13 @@ files:
176
162
  - ".ruby-version"
177
163
  - Appraisals
178
164
  - CHANGELOG.md
165
+ - CODE_OF_CONDUCT.md
166
+ - CONTRIBUTING.md
179
167
  - Gemfile
168
+ - LICENSE.md
180
169
  - README.md
181
170
  - Rakefile
171
+ - SECURITY.md
182
172
  - administrate-field-nested_has_many.gemspec
183
173
  - app/assets/javascripts/administrate-field-nested_has_many/application.js
184
174
  - app/assets/stylesheets/administrate-field-nested_has_many/application.css
@@ -187,20 +177,18 @@ files:
187
177
  - app/views/fields/nested_has_many/_form.html.erb
188
178
  - app/views/fields/nested_has_many/_index.html.erb
189
179
  - app/views/fields/nested_has_many/_show.html.erb
190
- - app/views/fields/nested_has_many/_show_current.html.erb
191
- - app/views/fields/nested_has_many/_show_old.html.erb
180
+ - bin/build-changelog
192
181
  - bin/rails
182
+ - bin/setup
193
183
  - config/i18n-tasks.yml
184
+ - config/locales/administrate-field-nested_has_many.de.yml
194
185
  - config/locales/administrate-field-nested_has_many.en.yml
186
+ - config/locales/administrate-field-nested_has_many.fr.yml
195
187
  - config/locales/administrate-field-nested_has_many.ja.yml
196
188
  - config/locales/administrate-field-nested_has_many.pt.yml
197
189
  - config/locales/administrate-field-nested_has_many.ru.yml
198
- - gemfiles/administrate_0.10.gemfile
199
- - gemfiles/administrate_0.10.gemfile.lock
200
- - gemfiles/administrate_0.13.gemfile
201
- - gemfiles/administrate_0.13.gemfile.lock
202
- - gemfiles/administrate_master.gemfile
203
- - gemfiles/administrate_master.gemfile.lock
190
+ - gemfiles/administrate_0.19.gemfile
191
+ - gemfiles/administrate_0.19.gemfile.lock
204
192
  - lib/administrate/field/nested_has_many.rb
205
193
  - spec/dummy/.gitignore
206
194
  - spec/dummy/Rakefile
@@ -217,14 +205,11 @@ files:
217
205
  - spec/dummy/app/dashboards/foo/student_dashboard.rb
218
206
  - spec/dummy/app/dashboards/school_dashboard.rb
219
207
  - spec/dummy/app/helpers/application_helper.rb
220
- - spec/dummy/app/mailers/application_mailer.rb
221
208
  - spec/dummy/app/models/application_record.rb
222
209
  - spec/dummy/app/models/concerns/.keep
223
210
  - spec/dummy/app/models/foo/student.rb
224
211
  - spec/dummy/app/models/school.rb
225
212
  - spec/dummy/app/views/layouts/application.html.erb
226
- - spec/dummy/app/views/layouts/mailer.html.erb
227
- - spec/dummy/app/views/layouts/mailer.text.erb
228
213
  - spec/dummy/bin/bundle
229
214
  - spec/dummy/bin/rails
230
215
  - spec/dummy/bin/rake
@@ -234,7 +219,6 @@ files:
234
219
  - spec/dummy/config.ru
235
220
  - spec/dummy/config/application.rb
236
221
  - spec/dummy/config/boot.rb
237
- - spec/dummy/config/cable.yml
238
222
  - spec/dummy/config/database.yml
239
223
  - spec/dummy/config/environment.rb
240
224
  - spec/dummy/config/environments/development.rb
@@ -247,12 +231,12 @@ files:
247
231
  - spec/dummy/config/initializers/filter_parameter_logging.rb
248
232
  - spec/dummy/config/initializers/inflections.rb
249
233
  - spec/dummy/config/initializers/mime_types.rb
234
+ - spec/dummy/config/initializers/permissions_policy.rb
250
235
  - spec/dummy/config/initializers/wrap_parameters.rb
251
236
  - spec/dummy/config/locales/en.yml
252
237
  - spec/dummy/config/puma.rb
253
238
  - spec/dummy/config/routes.rb
254
239
  - spec/dummy/config/spring.rb
255
- - spec/dummy/config/storage.yml
256
240
  - spec/dummy/db/migrate/20180907104642_create_schools.rb
257
241
  - spec/dummy/db/migrate/20180907104703_create_students.rb
258
242
  - spec/dummy/db/schema.rb
@@ -294,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
278
  - !ruby/object:Gem::Version
295
279
  version: '0'
296
280
  requirements: []
297
- rubygems_version: 3.1.2
281
+ rubygems_version: 3.5.3
298
282
  signing_key:
299
283
  specification_version: 4
300
284
  summary: Plugin for nested has_many forms in Administrate
@@ -314,14 +298,11 @@ test_files:
314
298
  - spec/dummy/app/dashboards/foo/student_dashboard.rb
315
299
  - spec/dummy/app/dashboards/school_dashboard.rb
316
300
  - spec/dummy/app/helpers/application_helper.rb
317
- - spec/dummy/app/mailers/application_mailer.rb
318
301
  - spec/dummy/app/models/application_record.rb
319
302
  - spec/dummy/app/models/concerns/.keep
320
303
  - spec/dummy/app/models/foo/student.rb
321
304
  - spec/dummy/app/models/school.rb
322
305
  - spec/dummy/app/views/layouts/application.html.erb
323
- - spec/dummy/app/views/layouts/mailer.html.erb
324
- - spec/dummy/app/views/layouts/mailer.text.erb
325
306
  - spec/dummy/bin/bundle
326
307
  - spec/dummy/bin/rails
327
308
  - spec/dummy/bin/rake
@@ -331,7 +312,6 @@ test_files:
331
312
  - spec/dummy/config.ru
332
313
  - spec/dummy/config/application.rb
333
314
  - spec/dummy/config/boot.rb
334
- - spec/dummy/config/cable.yml
335
315
  - spec/dummy/config/database.yml
336
316
  - spec/dummy/config/environment.rb
337
317
  - spec/dummy/config/environments/development.rb
@@ -344,12 +324,12 @@ test_files:
344
324
  - spec/dummy/config/initializers/filter_parameter_logging.rb
345
325
  - spec/dummy/config/initializers/inflections.rb
346
326
  - spec/dummy/config/initializers/mime_types.rb
327
+ - spec/dummy/config/initializers/permissions_policy.rb
347
328
  - spec/dummy/config/initializers/wrap_parameters.rb
348
329
  - spec/dummy/config/locales/en.yml
349
330
  - spec/dummy/config/puma.rb
350
331
  - spec/dummy/config/routes.rb
351
332
  - spec/dummy/config/spring.rb
352
- - spec/dummy/config/storage.yml
353
333
  - spec/dummy/db/migrate/20180907104642_create_schools.rb
354
334
  - spec/dummy/db/migrate/20180907104703_create_students.rb
355
335
  - spec/dummy/db/schema.rb
@@ -1,44 +0,0 @@
1
- <%#
2
- # HasMany Show Partial
3
-
4
- This partial renders a has_many relationship,
5
- to be displayed on a resource's show page.
6
-
7
- By default, the relationship is rendered
8
- as a table of the first few associated resources.
9
- The columns of the table are taken
10
- from the associated resource class's dashboard.
11
-
12
- ## Local variables:
13
-
14
- - `field`:
15
- An instance of [Administrate::Field::HasMany][1].
16
- Contains methods to help display a table of associated resources.
17
-
18
- [1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/HasMany
19
- %>
20
-
21
- <% if field.resources.any? %>
22
- <% order = field.order_from_params(params.fetch(field.name, {})) %>
23
- <% page_number = params.fetch(field.name, {}).fetch(:page, nil) %>
24
- <%= render(
25
- "collection",
26
- collection_presenter: field.associated_collection(order),
27
- collection_field_name: field.name,
28
- page: page,
29
- resources: field.resources(page_number, order),
30
- table_title: field.name,
31
- ) %>
32
-
33
- <% if field.more_than_limit? %>
34
- <span>
35
- <%= t(
36
- 'administrate.fields.has_many.more',
37
- count: field.limit,
38
- total_count: field.data.count,
39
- ) %>
40
- </span>
41
- <% end %>
42
- <% else %>
43
- <%= t("administrate.fields.has_many.none", default: "–") %>
44
- <% end %>
@@ -1,36 +0,0 @@
1
- <%#
2
- # HasMany Show Partial
3
- This partial renders a has_many relationship,
4
- to be displayed on a resource's show page.
5
- By default, the relationship is rendered
6
- as a table of the first few associated resources.
7
- The columns of the table are taken
8
- from the associated resource class's dashboard.
9
- ## Local variables:
10
- - `field`:
11
- An instance of [Administrate::Field::HasMany][1].
12
- Contains methods to help display a table of associated resources.
13
- [1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/HasMany
14
- %>
15
-
16
- <% if field.resources.any? %>
17
- <%= render(
18
- "collection",
19
- collection_presenter: field.associated_collection,
20
- resources: field.resources,
21
- table_title: field.name
22
- ) %>
23
-
24
- <% if field.more_than_limit? %>
25
- <span>
26
- <%= t(
27
- 'administrate.fields.has_many.more',
28
- count: field.limit,
29
- total_count: field.data.count,
30
- ) %>
31
- </span>
32
- <% end %>
33
-
34
- <% else %>
35
- <%= t("administrate.fields.has_many.none", default: "–") %>
36
- <% end %>
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "pg"
6
- gem "administrate", "0.10.0"
7
-
8
- gemspec path: "../"