Compute_public_path should be public instead of private

Hello, I’m in the middle of a situation where the method
compute_public_path must be public instead of private.

Some times we need to add .mov, .flv or even another kind of asset
like swf and I want use my correct public path because I already setup
a exclusive host for my static assets (wich is the right behavior).

I know I can use private methods inside my views, but it doesn’t
sounds strange? Why we have methods like image_path and
javascript_path (and are all public) but don’t have a method for all
other kind of static assets?

Is it possible for you to do something like this:

def explicitly_compute_public_path(source, dir, ext = nil,
include_host = true)
send(:compute_public_path, source, dir, ext, include_host)
end

–or–

module ActionView
module Helpers
module AssetTagHelper
def explicitly_compute_public_path(source, dir, ext = nil,
include_host = true)
compute_public_path(source, dir, ext, include_host)
end
end
end
end

WDYT?

On Sep 12, 2009, at 6:00 PM, Daniel L. wrote:

I know I can open or access private methods in runtime, but you
doesn’t think this method is a good thing to be public?

I’ve personally never understood the rationale for making this method
private. I’ve had to use it for custom asset-managers in the past and
it being private leads to this kind of code. Maybe someone else
understands the rationale because the use case for making it public is
the existence of assets that were not anticipated in the framework.

I know I can open or access private methods in runtime, but you
doesn’t think this method is a good thing to be public?