diff options
Diffstat (limited to 'railties/lib/generator')
-rw-r--r-- | railties/lib/generator/generators/app.thor | 26 | ||||
-rw-r--r-- | railties/lib/generator/templates/app/public/javascripts/application.js (renamed from railties/lib/generator/templates/app/javascripts/prototype/application.js) | 0 | ||||
-rw-r--r-- | railties/lib/generator/templates/app/public/javascripts/controls.js (renamed from railties/lib/generator/templates/app/javascripts/prototype/controls.js) | 0 | ||||
-rw-r--r-- | railties/lib/generator/templates/app/public/javascripts/dragdrop.js (renamed from railties/lib/generator/templates/app/javascripts/prototype/dragdrop.js) | 0 | ||||
-rw-r--r-- | railties/lib/generator/templates/app/public/javascripts/effects.js (renamed from railties/lib/generator/templates/app/javascripts/prototype/effects.js) | 0 | ||||
-rw-r--r-- | railties/lib/generator/templates/app/public/javascripts/prototype.js (renamed from railties/lib/generator/templates/app/javascripts/prototype/prototype.js) | 0 |
6 files changed, 18 insertions, 8 deletions
diff --git a/railties/lib/generator/generators/app.thor b/railties/lib/generator/generators/app.thor index 4aa2022759..a15344051b 100644 --- a/railties/lib/generator/generators/app.thor +++ b/railties/lib/generator/generators/app.thor @@ -50,9 +50,7 @@ module Rails::Generators inside "config" do copy_file "boot.rb" copy_file "routes.rb" - - template "databases/#{options[:database]}.yml", "database.yml" - template "environment.rb" + template "environment.rb" directory "environments" directory "initializers" @@ -60,6 +58,10 @@ module Rails::Generators end end + def craete_db_config_files + template "config/databases/#{options[:database]}.yml", "config/database.yml" + end + def create_db_files directory "db" end @@ -85,7 +87,19 @@ module Rails::Generators end def create_public_files - directory "public" + directory "public", "public", false # Non-recursive. Do small steps, so anyone can overwrite it. + end + + def create_public_image_files + directory "public/images" + end + + def create_public_stylesheets_files + directory "public/stylesheets" + end + + def create_public_javascripts_files + directory "public/javascripts" end def create_dispatch_files @@ -103,10 +117,6 @@ module Rails::Generators chmod "public/dispatch.fcgi", 0755, false end - def create_javascript_files - directory "javascripts/prototype", "public/javascripts" - end - def create_script_files directory "script" chmod "script", 0755, false diff --git a/railties/lib/generator/templates/app/javascripts/prototype/application.js b/railties/lib/generator/templates/app/public/javascripts/application.js index fe4577696b..fe4577696b 100644 --- a/railties/lib/generator/templates/app/javascripts/prototype/application.js +++ b/railties/lib/generator/templates/app/public/javascripts/application.js diff --git a/railties/lib/generator/templates/app/javascripts/prototype/controls.js b/railties/lib/generator/templates/app/public/javascripts/controls.js index ca29aefdd1..ca29aefdd1 100644 --- a/railties/lib/generator/templates/app/javascripts/prototype/controls.js +++ b/railties/lib/generator/templates/app/public/javascripts/controls.js diff --git a/railties/lib/generator/templates/app/javascripts/prototype/dragdrop.js b/railties/lib/generator/templates/app/public/javascripts/dragdrop.js index 07229f986f..07229f986f 100644 --- a/railties/lib/generator/templates/app/javascripts/prototype/dragdrop.js +++ b/railties/lib/generator/templates/app/public/javascripts/dragdrop.js diff --git a/railties/lib/generator/templates/app/javascripts/prototype/effects.js b/railties/lib/generator/templates/app/public/javascripts/effects.js index 5a639d2dea..5a639d2dea 100644 --- a/railties/lib/generator/templates/app/javascripts/prototype/effects.js +++ b/railties/lib/generator/templates/app/public/javascripts/effects.js diff --git a/railties/lib/generator/templates/app/javascripts/prototype/prototype.js b/railties/lib/generator/templates/app/public/javascripts/prototype.js index dfe8ab4e13..dfe8ab4e13 100644 --- a/railties/lib/generator/templates/app/javascripts/prototype/prototype.js +++ b/railties/lib/generator/templates/app/public/javascripts/prototype.js |