Closed mahendrapk closed 5 days ago
I did some investigation and found out that #72 deprecated the tld_length
and introduced below warning:
Apartment::Deprecation.warn('`config.tld_length` have no effect because it was removed in https://github.com/influitive/apartment/pull/309')
should that also have require 'apartment/deprecation'
?
For my purpose - I will get rid of tld_length
references from the code base as below PRs suggest it has no impact. But feels nice
to fix if we can, if all it takes is require
.
Ref:
Thanks a lot to contributors for bringing this gem back to life. 🙏
Background
Trying to migrate an existing RoR project that uses
influitive/apartment
torails-on-service/apartment
config/initializers/apartment.rb
in the existing project hadconfig.tld_length = 1
. After switching toros-apartment
the config block started throwing the NameError mentioned in the title.Steps to reproduce
The block throws NameError.
Also when tried in
rails console
:Expected behavior
Should not throw NameError.
Actual behavior
Throws NameError
System configuration
Database: Mysql Ver 8.0.31 for macos12.6 on x86_64 (Homebrew)
Apartment version: 2.11.0
Apartment config (in
config/initializers/apartment.rb
or so):use_schemas
:false
Rails (or ActiveRecord) version: 5.2.0
Ruby version: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin20]