Skip to content

Commit 75a4208

Browse files
author
Robert Mitwicki
committed
Update templates/rails/database.yml.rb
Much better way ;)
1 parent 843ed2c commit 75a4208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/rails/database.yml.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# TODO think about a better way
2-
db_name = app_path.split('/').last
2+
db_name = Rails.application.class.parent_name.underscore
33

44
database = options[:database].delete('jdbc')
55
database = 'postgres' if database == 'postgresql'

0 commit comments

Comments
 (0)