Skip to content

Commit

Permalink
Update lib/generators/solid_cache/install/install_generator.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Tejas <tejas-shetty@outlook.com>
  • Loading branch information
emars and shetty-tejas authored Sep 6, 2024
1 parent d87cdb1 commit e291fe0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generators/solid_cache/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def sqlite_database_config_with_cache
end

def app_name_from_production_database_name
database_yml.read.scan(/database: (\w+)_production/).flatten.first || "app"
database_yml.read.scan(/database: (\w+)_production/).flatten.first || (defined?(Rails) ? Rails.application.name.underscore : "app")
end

def generic_database_config_with_cache
Expand Down

0 comments on commit e291fe0

Please sign in to comment.