I had a surprise today migrating an app from beta4 to final. Suddenly I got an error from one of my path helpers when used from inside a controller:
redirect_to asset_path(@asset)
Some investigation revealed this commit
commit 2af8fd2829ec573ef7da8a44d31e5f25ef4a8408 Author: Jos� Valim <jose.valim@gmail.com>
Also move asset_path to AbstractController.
diff --git a/actionpack/lib/abstract_controller/asset_paths.rb b/actionpack/lib/abstract_controller/asset_paths.rb index 16c900d..9ca2fb7 100644 --- a/actionpack/lib/abstract_controller/asset_paths.rb +++ b/actionpack/lib/abstract_controller/asset_paths.rb @@ -3,7 +3,7 @@ module AbstractController extend ActiveSupport::Concern
included do - config_accessor :asset_host, :assets_dir, :javascripts_dir, :stylesheets_dir + config_accessor :asset_host, :asset_path, :assets_dir, :javascripts_dir, :stylesheets_dir end end end
I'm sure the change was well-intentioned, but it surreptitiously grabs a rather common name and reserving it for the framework. In effect, this change precludes having an asset resource. I think this is bad.
Michael