-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overriding Rails config defaults for compatibility (#7016)
* Set modified defaults during hyrax app generation * Move Rails configuration default overrides into a Hyrax managed initializer * Overriding action_view defaults resulting in test failures * Overriding action_controller defaults to allow open redirects * Overriding action_view sanitizer default back to HTML4, extra char encoding breaks test comparisons * Adding allow_other_host option to intentional open redirects instead of overriding raise_on_open_redirects config default --------- Co-authored-by: Daniel Pierce <[email protected]>
- Loading branch information
1 parent
02af9cf
commit e88c89e
Showing
6 changed files
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# Any options set here are to override Rails 7.2 configuration defaults | ||
|
||
# These fix a couple of issues arising from Rails 7.2 enforcement of HTML5 semantics | ||
# by default when using certain Rails methods | ||
Rails.application.config.action_view.button_to_generates_button_tag = false | ||
Rails.application.config.action_view.sanitizer_vendor = Rails::HTML4::Sanitizer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
insert_into_file 'config/application.rb', after: /config\.load_defaults [0-9.]+$/ do | ||
"\n config.add_autoload_paths_to_load_path = true" | ||
end | ||
|
||
gem 'hyrax', '5.0.3' | ||
run 'bundle install' | ||
generate 'hyrax:install', '-f' |