Permalink
Browse files

* allow to use this template with jruby with newer rails versions as …

…well

* since 'bundle install' runs at the end of the rails template then it install the rails version with which the application got generated
  • Loading branch information...
1 parent 8c99f33 commit 2bb098f2590f47d1a3cf80e6df53259a21bbf51b @mkristian mkristian committed with dkubb Nov 28, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 templates/rails/database.yml.rb
  2. +1 −1 templates/rails/gemfile.rb
@@ -1,7 +1,7 @@
# TODO think about a better way
db_name = app_path.split('/').last
-database = options[:database]
+database = options[:database].sub(/jdbc/, '')
database = 'postgres' if database == 'postgresql'
database = 'sqlite' if database == 'sqlite3'
@@ -3,7 +3,7 @@
DATAMAPPER = '#{DATAMAPPER}'
RSPEC = '#{RSPEC}'
-database = options[:database]
+database = options[:database].sub(/jdbc/, '')
database = 'postgres' if database == 'postgresql'
database = 'sqlite' if database == 'sqlite3'

0 comments on commit 2bb098f

Please sign in to comment.