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 <[email protected]>
Date:   Sat Jul 24 00:47:48 2010 +0200

    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

-- 
Michael Schuerig
mailto:[email protected]
http://www.schuerig.de/michael/

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to