diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 4 | ||||
-rw-r--r-- | actionpack/lib/sprockets/assets.rake | 1 | ||||
-rw-r--r-- | actionpack/lib/sprockets/railtie.rb | 6 | ||||
-rw-r--r-- | actionpack/test/lib/controller/fake_models.rb | 11 |
4 files changed, 11 insertions, 11 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index d55064bf6d..d01422b314 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -48,8 +48,12 @@ *Rails 3.1.1 (unreleased)* +* Don't mount Sprockets server at config.assets.prefix if config.assets.compile is false. [Mark J. Titorenko] + * Set relative url root in assets when controller isn't available for Sprockets (eg. Sass files using asset_path). Fixes #2435 [Guillermo Iguaran] +* Fix basic auth credential generation to not make newlines. GH #2882 + * Fixed the behavior of asset pipeline when config.assets.digest and config.assets.compile are false and requested asset isn't precompiled. Before the requested asset were compiled anyway ignoring that the config.assets.compile flag is false. [Guillermo Iguaran] diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake index 0531b1509b..9b2f3a3f94 100644 --- a/actionpack/lib/sprockets/assets.rake +++ b/actionpack/lib/sprockets/assets.rake @@ -9,6 +9,7 @@ namespace :assets do Kernel.exec $0, *ARGV else Rake::Task["environment"].invoke + Rake::Task["tmp:cache:clear"].invoke # Ensure that action view is loaded and the appropriate sprockets hooks get executed ActionView::Base diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb index dc991636a1..f05d835554 100644 --- a/actionpack/lib/sprockets/railtie.rb +++ b/actionpack/lib/sprockets/railtie.rb @@ -67,8 +67,10 @@ module Sprockets end end - app.routes.prepend do - mount app.assets => config.assets.prefix + if config.assets.compile + app.routes.prepend do + mount app.assets => config.assets.prefix + end end if config.assets.digest diff --git a/actionpack/test/lib/controller/fake_models.rb b/actionpack/test/lib/controller/fake_models.rb index cbef74f992..363403092b 100644 --- a/actionpack/test/lib/controller/fake_models.rb +++ b/actionpack/test/lib/controller/fake_models.rb @@ -48,26 +48,19 @@ module Quiz end end -class Post < Struct.new(:title, :author_name, :body, :secret, :written_on, :cost) +class Post < Struct.new(:title, :author_name, :body, :secret, :persisted, :written_on, :cost) extend ActiveModel::Naming include ActiveModel::Conversion extend ActiveModel::Translation alias_method :secret?, :secret + alias_method :persisted?, :persisted def initialize(*args) super @persisted = false end - def persisted=(boolean) - @persisted = boolean - end - - def persisted? - @persisted - end - attr_accessor :author def author_attributes=(attributes); end |