mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
use rails 5.1 defaults
This commit is contained in:
@@ -54,10 +54,10 @@ module OpenProject
|
||||
# https://guides.rubyonrails.org/configuring.html#versioned-default-values
|
||||
# for the default values associated with a particular version.
|
||||
#
|
||||
# Goal is to reach 7.0 defaults. Overridden defaults should be stored in
|
||||
# Goal is to reach 8.0 defaults. Overridden defaults should be stored in
|
||||
# specific initializers files. See
|
||||
# https://community.openproject.org/wp/45463 for details.
|
||||
config.load_defaults 5.0
|
||||
config.load_defaults 5.1
|
||||
|
||||
# Please, add to the `ignore` list any other `lib` subdirectories that do
|
||||
# not contain `.rb` files, or that should not be reloaded or eager loaded.
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
#
|
||||
# This file contains migration options to ease your Rails 5.1 upgrade.
|
||||
#
|
||||
# Once upgraded flip defaults one by one to migrate to the new default.
|
||||
#
|
||||
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
||||
|
||||
# https://guides.rubyonrails.org/configuring.html#config-action-view-form-with-generates-remote-forms
|
||||
# Make `form_with` generate non-remote forms. Previous versions had false.
|
||||
# Rails 5.1, 5.2, and 6.0 default is true. Rails 6.1+ default is false.
|
||||
# Let's keep it false as it is the definitive default
|
||||
# Rails.application.config.action_view.form_with_generates_remote_forms = true
|
||||
|
||||
# https://guides.rubyonrails.org/configuring.html#config-assets-unknown-asset-fallback
|
||||
# Unknown asset fallback will return the path passed in when the given
|
||||
# asset is not present in the asset pipeline. Previous versions had true.
|
||||
# Rails 5.1+ default is false.
|
||||
# Rails.application.config.assets.unknown_asset_fallback = false
|
||||
@@ -93,3 +93,9 @@
|
||||
# preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
|
||||
# Previous versions had false. Rails 6.1+ default is true.
|
||||
# Rails.application.config.action_view.preload_links_header = true
|
||||
|
||||
# Copied from 5.1 to keep the value to false even with the defaults of 5.1 being activated.
|
||||
# https://guides.rubyonrails.org/configuring.html#config-action-view-form-with-generates-remote-forms
|
||||
# Make `form_with` generate non-remote forms. Previous versions had false.
|
||||
# Rails 5.1, 5.2, and 6.0 default is true. Rails 6.1+ default is false.
|
||||
Rails.application.config.action_view.form_with_generates_remote_forms = false
|
||||
|
||||
@@ -44,7 +44,8 @@ RSpec.describe "layouts/base" do
|
||||
|
||||
context "with an authenticator with given icon" do
|
||||
let(:provider) do
|
||||
{ name: "foob_auth", icon: "image.png" }
|
||||
# Need to use an actually existing image as the asset pipeline will otherwise not include the link.
|
||||
{ name: "foob_auth", icon: "openid_connect/auth_provider-custom.png" }
|
||||
end
|
||||
|
||||
before do
|
||||
@@ -52,7 +53,7 @@ RSpec.describe "layouts/base" do
|
||||
end
|
||||
|
||||
it "adds the CSS to render the icon" do
|
||||
expect(rendered).to have_text(/background-image:(?:.*)image.png/)
|
||||
expect(rendered).to have_text(/background-image:(?:.*)auth_provider-custom.png/)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user