Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Commit ea16ef8

Browse files
committed
Change to use String#delete to remove a substring rather than String#sub
1 parent 2bb098f commit ea16ef8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/rails/database.yml.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# TODO think about a better way
22
db_name = app_path.split('/').last
33

4-
database = options[:database].sub(/jdbc/, '')
4+
database = options[:database].delete('jdbc')
55
database = 'postgres' if database == 'postgresql'
66
database = 'sqlite' if database == 'sqlite3'
77

templates/rails/gemfile.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
DATAMAPPER = '#{DATAMAPPER}'
44
RSPEC = '#{RSPEC}'
55

6-
database = options[:database].sub(/jdbc/, '')
6+
database = options[:database].delete('jdbc')
77
database = 'postgres' if database == 'postgresql'
88
database = 'sqlite' if database == 'sqlite3'
99

0 commit comments

Comments
 (0)