Access Ruby on Rails 'public' directory without relative path
- by huntca
I have a flash object I wish to load and I belive the best place to store that asset is in the public directory. Suppose it's stored in public/flash, there must be a better way to path to the swf than what I've done below. Note the 'data' element, it has a relative path.
def create_vnc_object
haml_tag :object,
:id => 'flash',
:width => '100%',
:height => '100%',
:type => 'application/x-shockwave-flash',
:data => '../../flash/flash.swf' do
haml_tag :param,
:name => 'movie',
:value => '../../flash/flash.swf'
end
end
Is there some rails variable that points to public?