rails / solid_cache

A database-backed ActiveSupport::Cache::Store
MIT License
890 stars 63 forks source link

Adds fallback to app_name_from_production_database_name #209

Closed emars closed 2 months ago

emars commented 2 months ago

app_name_from_production_database_name can sometimes return nil if your config does not match the expected format.

This pull request adds a default to this method so the generator does not fail when calling app_name.upcase.

dhh commented 2 months ago

I'd actually rather follow the lead from solid_queue and yank this munging all together. Rails 8 will do this configuration directly in config/database.yml out of the box, and I think it's too likely that we won't match things right otherwise. So should update the README to just be explicit about what you need to add to config/database.yml.