diff options
Diffstat (limited to 'railties/lib')
7 files changed, 14 insertions, 6 deletions
diff --git a/railties/lib/rails/commands/runner.rb b/railties/lib/rails/commands/runner.rb index ddd08a32ee..f8b00e7249 100644 --- a/railties/lib/rails/commands/runner.rb +++ b/railties/lib/rails/commands/runner.rb @@ -25,7 +25,7 @@ ARGV.clone.options do |opts| opts.separator "-------------------------------------------------------------" opts.separator "#!/usr/bin/env #{File.expand_path($0)} runner" opts.separator "" - opts.separator "Product.find(:all).each { |p| p.price *= 2 ; p.save! }" + opts.separator "Product.all.each { |p| p.price *= 2 ; p.save! }" opts.separator "-------------------------------------------------------------" end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 2015a944f0..6a125685d0 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -523,6 +523,7 @@ module Rails initializer :append_assets_path do |app| app.config.assets.paths.unshift *paths["vendor/assets"].existent + app.config.assets.paths.unshift *paths["lib/assets"].existent app.config.assets.paths.unshift *paths["app/assets"].existent end diff --git a/railties/lib/rails/engine/configuration.rb b/railties/lib/rails/engine/configuration.rb index 241db4b0a9..f424492bb4 100644 --- a/railties/lib/rails/engine/configuration.rb +++ b/railties/lib/rails/engine/configuration.rb @@ -47,6 +47,7 @@ module Rails paths.add "app/mailers", :eager_load => true paths.add "app/views" paths.add "lib", :load_path => true + paths.add "lib/assets", :glob => "*" paths.add "lib/tasks", :glob => "**/*.rake" paths.add "config" paths.add "config/environments", :glob => "#{Rails.env}.rb" diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index a69efdf29d..3af28bb416 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -9,7 +9,7 @@ source 'http://rubygems.org' <%= "gem 'json'\n" if RUBY_VERSION < "1.9.2" -%> gem 'sass' gem 'coffee-script' -gem 'uglifier' +gem 'uglifier', :git => 'git://github.com/lautis/uglifier.git' <%= gem_for_javascript %> @@ -22,4 +22,4 @@ gem 'uglifier' # To use debugger # <%= gem_for_ruby_debugger %> -<%= gem_for_turn -%>
\ No newline at end of file +<%= gem_for_turn -%> diff --git a/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt b/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt index 612c614f2e..19294b3478 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt +++ b/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt @@ -1,5 +1,8 @@ -// FIXME: Tell people that this is a manifest file, real code should go into discrete files -// FIXME: Tell people how Sprockets and CoffeeScript works +// This is a manifest file that'll be compiled into including all the files listed below. +// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically +// be included in the compiled file accessible from http://example.com/assets/application.js +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// the compiled file. // <% unless options[:skip_javascript] -%> //= require <%= options[:javascript] %> diff --git a/railties/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css b/railties/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css index f4b082ccc0..fc25b5723f 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css +++ b/railties/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css @@ -1,5 +1,7 @@ /* - * FIXME: Introduce SCSS & Sprockets + * This is a manifest file that'll automatically include all the stylesheets available in this directory + * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at + * the top of the compiled file, but it's generally better to create a new file per style scope. *= require_self *= require_tree . */
\ No newline at end of file diff --git a/railties/lib/rails/generators/rails/app/templates/gitignore b/railties/lib/rails/generators/rails/app/templates/gitignore index f0fa30c536..923b697662 100644 --- a/railties/lib/rails/generators/rails/app/templates/gitignore +++ b/railties/lib/rails/generators/rails/app/templates/gitignore @@ -2,3 +2,4 @@ db/*.sqlite3 log/*.log tmp/ +.sass-cache/ |