IN the code the list of allowed config labels for ActiveRecord are username, database, host and port. These are fetched from an ActiveRecord::DatabaseConfigurations::HashConfig object using public_send. Hence they expect a public method to return those values.
In Rails 6.1.4.1 (and I believe from Rails 6.1.0.rc1 onward) only 2 of those methods exist in Rails - database and host.
So in fact username and port - while allowed - return an NoMethodError in place of the valued content.
IN the code the list of allowed config labels for ActiveRecord are
username
,database
,host
andport
. These are fetched from anActiveRecord::DatabaseConfigurations::HashConfig
object usingpublic_send
. Hence they expect a public method to return those values.In Rails 6.1.4.1 (and I believe from Rails 6.1.0.rc1 onward) only 2 of those methods exist in Rails -
database
andhost
.So in fact
username
andport
- while allowed - return anNoMethodError
in place of the valued content.