diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-04 23:53:41 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-04 23:53:41 +0000 |
commit | 045f5fd02e8418fedba651b329715a0bb5ea8c68 (patch) | |
tree | fb0826af8880971a69537ddad3a4bd5d800c0adc /railties/lib/rails_generator | |
parent | 55854c4195177d2d5cbf0497c77e63b24cb76074 (diff) | |
download | rails-045f5fd02e8418fedba651b329715a0bb5ea8c68.tar.gz rails-045f5fd02e8418fedba651b329715a0bb5ea8c68.tar.bz2 rails-045f5fd02e8418fedba651b329715a0bb5ea8c68.zip |
Added public/javascripts/application.js as a sample since it'll automatically be included in javascript_include_tag :defaults [DHH] (backed out of -a/--with-assets, not worth it)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3770 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index 8e40127dce..2a71c35599 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -6,7 +6,7 @@ class AppGenerator < Rails::Generator::Base DATABASES = %w( mysql oracle postgresql sqlite2 sqlite3 ) - default_options :db => "mysql", :shebang => DEFAULT_SHEBANG, :include_assets => false + default_options :db => "mysql", :shebang => DEFAULT_SHEBANG mandatory_options :source => "#{File.dirname(__FILE__)}/../../../../.." def initialize(runtime_args, runtime_options = {}) @@ -69,10 +69,11 @@ class AppGenerator < Rails::Generator::Base m.file "html/images/rails.png", "public/images/rails.png" # Javascripts - m.file "html/javascripts/prototype.js", "public/javascripts/prototype.js" - m.file "html/javascripts/effects.js", "public/javascripts/effects.js" - m.file "html/javascripts/dragdrop.js", "public/javascripts/dragdrop.js" - m.file "html/javascripts/controls.js", "public/javascripts/controls.js" + m.file "html/javascripts/prototype.js", "public/javascripts/prototype.js" + m.file "html/javascripts/effects.js", "public/javascripts/effects.js" + m.file "html/javascripts/dragdrop.js", "public/javascripts/dragdrop.js" + m.file "html/javascripts/controls.js", "public/javascripts/controls.js" + m.file "html/javascripts/application.js", "public/javascripts/application.js" # Docs m.file "doc/README_FOR_APP", "doc/README_FOR_APP" @@ -81,13 +82,6 @@ class AppGenerator < Rails::Generator::Base %w(server production development test).each { |file| m.file "configs/empty.log", "log/#{file}.log", :chmod => 0666 } - - # Default assets - if options[:include_assets] - m.file "assets/application.css", "public/stylesheets/application.css" - m.file "assets/application.js", "public/javascripts/application.css" - m.file "assets/application.rhtml", "app/views/layouts/application.rhtml" - end end end @@ -106,9 +100,6 @@ class AppGenerator < Rails::Generator::Base opt.on("-d", "--database=name", String, "Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite2/sqlite3).", "Default: mysql") { |options[:db]| } - - opt.on("-a", "--with-assets", - "Include default assets for layout, javascript, and stylesheet.") { |options[:include_assets]| } end def mysql_socket_location |