diff options
author | Arun Agrawal <arun@fromjaipur.com> | 2011-04-23 18:55:17 +0530 |
---|---|---|
committer | Arun Agrawal <arun@fromjaipur.com> | 2011-04-23 19:03:24 +0530 |
commit | b335533e16436d1a12f15a60f6436bdc7b967012 (patch) | |
tree | 461946eef3a34d919e789273aae1c1f18cfe4250 /railties/lib/rails | |
parent | 6cea2436d7bb8e62acc35d98d141f3bab7743dbc (diff) | |
download | rails-b335533e16436d1a12f15a60f6436bdc7b967012.tar.gz rails-b335533e16436d1a12f15a60f6436bdc7b967012.tar.bz2 rails-b335533e16436d1a12f15a60f6436bdc7b967012.zip |
jdbcsqlite3 support added into template. #jruby
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml | 17 |
2 files changed, 20 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index ddfd5256fe..b240222c6e 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -9,7 +9,8 @@ require 'uri' module Rails module Generators class AppBase < Base - DATABASES = %w( mysql oracle postgresql sqlite3 frontbase ibm_db jdbcmysql ) + JDBC_DATABASES = %w( jdbcmysql jdbcsqlite3 ) + DATABASES = %w( mysql oracle postgresql sqlite3 frontbase ibm_db ) + JDBC_DATABASES JAVASCRIPTS = %w( jquery prototype ) attr_accessor :rails_template @@ -163,6 +164,7 @@ module Rails when "frontbase" then "ruby-frontbase" when "mysql" then "mysql2" when "jdbcmysql" then "activerecord-jdbcmysql-adapter" + when "jdbcsqlite3" then "activerecord-jdbcsqlite3-adapter" else options[:database] end end diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml new file mode 100644 index 0000000000..30776b3b4e --- /dev/null +++ b/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml @@ -0,0 +1,17 @@ +# SQLite version 3.x +# gem 'activerecord-jdbcsqlite3-adapter' + +development: + adapter: jdbcsqlite3 + database: db/development.sqlite3 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + adapter: jdbcsqlite3 + database: db/test.sqlite3 + +production: + adapter: jdbcsqlite3 + database: db/production.sqlite3 |