administrate-field-nested_has_many 1.3.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +1 -1
  3. data/.ruby-version +1 -1
  4. data/Appraisals +6 -6
  5. data/CHANGELOG.md +31 -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 +40 -1
  10. data/SECURITY.md +16 -0
  11. data/administrate-field-nested_has_many.gemspec +2 -3
  12. data/app/assets/javascripts/administrate-field-nested_has_many/application.js +6 -0
  13. data/app/views/fields/nested_has_many/_show.html.erb +35 -6
  14. data/bin/build-changelog +24 -0
  15. data/bin/setup +13 -0
  16. data/config/locales/administrate-field-nested_has_many.de.yml +7 -0
  17. data/config/locales/administrate-field-nested_has_many.fr.yml +7 -0
  18. data/gemfiles/{administrate_0.13.gemfile → administrate_0.19.gemfile} +1 -1
  19. data/gemfiles/administrate_0.19.gemfile.lock +260 -0
  20. data/gemfiles/{administrate_0.10.gemfile → administrate_0.20.gemfile} +1 -1
  21. data/gemfiles/administrate_0.20.gemfile.lock +260 -0
  22. data/gemfiles/{administrate_master.gemfile → administrate_main.gemfile} +1 -1
  23. data/gemfiles/administrate_main.gemfile.lock +266 -0
  24. data/lib/administrate/field/nested_has_many.rb +35 -15
  25. data/spec/dummy/Rakefile +1 -1
  26. data/spec/dummy/app/dashboards/school_dashboard.rb +1 -1
  27. data/spec/dummy/bin/rails +2 -2
  28. data/spec/dummy/bin/rake +2 -2
  29. data/spec/dummy/bin/setup +6 -9
  30. data/spec/dummy/config/application.rb +12 -9
  31. data/spec/dummy/config/boot.rb +1 -1
  32. data/spec/dummy/config/environment.rb +1 -1
  33. data/spec/dummy/config/environments/development.rb +16 -4
  34. data/spec/dummy/config/environments/test.rb +19 -6
  35. data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -3
  36. data/spec/dummy/config/initializers/content_security_policy.rb +3 -0
  37. data/spec/dummy/config/initializers/filter_parameter_logging.rb +3 -1
  38. data/spec/dummy/config/initializers/permissions_policy.rb +11 -0
  39. data/spec/dummy/config/locales/en.yml +1 -1
  40. data/spec/dummy/config/puma.rb +13 -4
  41. data/spec/dummy/config.ru +2 -1
  42. data/spec/dummy/db/schema.rb +14 -11
  43. data/spec/features/has_many_spec.rb +10 -0
  44. metadata +23 -39
  45. data/app/views/fields/nested_has_many/_show_current.html.erb +0 -44
  46. data/app/views/fields/nested_has_many/_show_old.html.erb +0 -36
  47. data/gemfiles/administrate_0.10.gemfile.lock +0 -214
  48. data/gemfiles/administrate_0.13.gemfile.lock +0 -207
  49. data/gemfiles/administrate_master.gemfile.lock +0 -219
  50. data/spec/dummy/app/mailers/application_mailer.rb +0 -4
  51. data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
  52. data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
  53. data/spec/dummy/config/cable.yml +0 -10
  54. data/spec/dummy/config/storage.yml +0 -34
@@ -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,28 +2,31 @@
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
- ActiveRecord::Schema.define(version: 2018_09_07_104703) do
13
+ ActiveRecord::Schema[7.1].define(version: 2018_09_07_104703) do
14
+ # These are extensions that must be enabled in order to support this database
15
+ enable_extension "plpgsql"
14
16
 
15
17
  create_table "schools", force: :cascade do |t|
16
18
  t.string "name"
17
- t.datetime "created_at", null: false
18
- t.datetime "updated_at", null: false
19
+ t.datetime "created_at", precision: nil, null: false
20
+ t.datetime "updated_at", precision: nil, null: false
19
21
  end
20
22
 
21
23
  create_table "students", force: :cascade do |t|
22
24
  t.string "name"
23
- t.integer "school_id"
24
- t.datetime "created_at", null: false
25
- t.datetime "updated_at", null: false
25
+ t.bigint "school_id"
26
+ t.datetime "created_at", precision: nil, null: false
27
+ t.datetime "updated_at", precision: nil, null: false
26
28
  t.index ["school_id"], name: "index_students_on_school_id"
27
29
  end
28
30
 
31
+ add_foreign_key "students", "schools"
29
32
  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.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Charlton
@@ -9,15 +9,15 @@ 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-03-15 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.19'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
23
  version: '1'
@@ -25,9 +25,9 @@ dependencies:
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.19'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1'
@@ -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,22 @@ 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
192
+ - gemfiles/administrate_0.20.gemfile
193
+ - gemfiles/administrate_0.20.gemfile.lock
194
+ - gemfiles/administrate_main.gemfile
195
+ - gemfiles/administrate_main.gemfile.lock
204
196
  - lib/administrate/field/nested_has_many.rb
205
197
  - spec/dummy/.gitignore
206
198
  - spec/dummy/Rakefile
@@ -217,14 +209,11 @@ files:
217
209
  - spec/dummy/app/dashboards/foo/student_dashboard.rb
218
210
  - spec/dummy/app/dashboards/school_dashboard.rb
219
211
  - spec/dummy/app/helpers/application_helper.rb
220
- - spec/dummy/app/mailers/application_mailer.rb
221
212
  - spec/dummy/app/models/application_record.rb
222
213
  - spec/dummy/app/models/concerns/.keep
223
214
  - spec/dummy/app/models/foo/student.rb
224
215
  - spec/dummy/app/models/school.rb
225
216
  - 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
217
  - spec/dummy/bin/bundle
229
218
  - spec/dummy/bin/rails
230
219
  - spec/dummy/bin/rake
@@ -234,7 +223,6 @@ files:
234
223
  - spec/dummy/config.ru
235
224
  - spec/dummy/config/application.rb
236
225
  - spec/dummy/config/boot.rb
237
- - spec/dummy/config/cable.yml
238
226
  - spec/dummy/config/database.yml
239
227
  - spec/dummy/config/environment.rb
240
228
  - spec/dummy/config/environments/development.rb
@@ -247,12 +235,12 @@ files:
247
235
  - spec/dummy/config/initializers/filter_parameter_logging.rb
248
236
  - spec/dummy/config/initializers/inflections.rb
249
237
  - spec/dummy/config/initializers/mime_types.rb
238
+ - spec/dummy/config/initializers/permissions_policy.rb
250
239
  - spec/dummy/config/initializers/wrap_parameters.rb
251
240
  - spec/dummy/config/locales/en.yml
252
241
  - spec/dummy/config/puma.rb
253
242
  - spec/dummy/config/routes.rb
254
243
  - spec/dummy/config/spring.rb
255
- - spec/dummy/config/storage.yml
256
244
  - spec/dummy/db/migrate/20180907104642_create_schools.rb
257
245
  - spec/dummy/db/migrate/20180907104703_create_students.rb
258
246
  - spec/dummy/db/schema.rb
@@ -294,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
282
  - !ruby/object:Gem::Version
295
283
  version: '0'
296
284
  requirements: []
297
- rubygems_version: 3.1.2
285
+ rubygems_version: 3.5.3
298
286
  signing_key:
299
287
  specification_version: 4
300
288
  summary: Plugin for nested has_many forms in Administrate
@@ -314,14 +302,11 @@ test_files:
314
302
  - spec/dummy/app/dashboards/foo/student_dashboard.rb
315
303
  - spec/dummy/app/dashboards/school_dashboard.rb
316
304
  - spec/dummy/app/helpers/application_helper.rb
317
- - spec/dummy/app/mailers/application_mailer.rb
318
305
  - spec/dummy/app/models/application_record.rb
319
306
  - spec/dummy/app/models/concerns/.keep
320
307
  - spec/dummy/app/models/foo/student.rb
321
308
  - spec/dummy/app/models/school.rb
322
309
  - 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
310
  - spec/dummy/bin/bundle
326
311
  - spec/dummy/bin/rails
327
312
  - spec/dummy/bin/rake
@@ -331,7 +316,6 @@ test_files:
331
316
  - spec/dummy/config.ru
332
317
  - spec/dummy/config/application.rb
333
318
  - spec/dummy/config/boot.rb
334
- - spec/dummy/config/cable.yml
335
319
  - spec/dummy/config/database.yml
336
320
  - spec/dummy/config/environment.rb
337
321
  - spec/dummy/config/environments/development.rb
@@ -344,12 +328,12 @@ test_files:
344
328
  - spec/dummy/config/initializers/filter_parameter_logging.rb
345
329
  - spec/dummy/config/initializers/inflections.rb
346
330
  - spec/dummy/config/initializers/mime_types.rb
331
+ - spec/dummy/config/initializers/permissions_policy.rb
347
332
  - spec/dummy/config/initializers/wrap_parameters.rb
348
333
  - spec/dummy/config/locales/en.yml
349
334
  - spec/dummy/config/puma.rb
350
335
  - spec/dummy/config/routes.rb
351
336
  - spec/dummy/config/spring.rb
352
- - spec/dummy/config/storage.yml
353
337
  - spec/dummy/db/migrate/20180907104642_create_schools.rb
354
338
  - spec/dummy/db/migrate/20180907104703_create_students.rb
355
339
  - 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 %>