Skip to content

Commit

Permalink
fix tests with nested subforms enabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
scambra committed Oct 23, 2024
1 parent d555265 commit c3ca07d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion test/mock_app/app/controllers/buildings_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class BuildingsController < ApplicationController
active_scaffold do
active_scaffold do |conf|
conf.columns.exclude :files
conf.subform.columns.exclude :tenants
end
end
5 changes: 4 additions & 1 deletion test/mock_app/app/controllers/floors_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
class FloorsController < ApplicationController
active_scaffold do |conf|
conf.columns << :number_required
conf.subform.columns << :number_required
conf.subform.columns = [:building, :number, :number_required, :tenant]
conf.columns[:address].form_ui = :select
conf.columns[:building].form_ui = :select
conf.columns[:tenant].form_ui = :select
end
end
2 changes: 1 addition & 1 deletion test/mock_app/app/controllers/people_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ class PeopleController < ApplicationController
conf.columns.exclude :files
conf.columns[:buildings].includes = nil
conf.columns[:buildings].associated_limit = 0
conf.create.columns.exclude :address
conf.create.columns.exclude :address, :home
end
end

0 comments on commit c3ca07d

Please sign in to comment.