On Oct 14, 2011, at 3:13 PM, Richard Lung wrote:

> Hi guys,
> 
> I'm trying to make a folder in the public and I wanna link to the
> folder.
> I can't figure out how to do it.
> also how does it know when we do like <%= stylesheet_link_tag >, it
> will point to the stylesheet folder inside the public folder?
> 
> any help will be appreciated, TIA.
> 

If you think about the public folder as the Apache root folder on a static Web 
server, all paths will make sense. If you're using the Rails link helper (and 
you don't have any conflicting routes) then it's as simple as this:

#folder structure
/public
        /foo
                /bar
                        baz.html

#erb
<%= link_to 'Baz', '/foo/bar/baz.html' %>

Walter


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en.

Reply via email to