(Just getting started w rails, web app dev for a long time...) I have some partials that are common across multiple controllers. They''re not universal, so they don''t belong to be part of these controllers'' layouts. It appears that I can put them at the root of /views/, and render them using a relative path, like so: <%= render :partial => "./footer" %> But this leaves a bunch of files at the root of /views/. It''s early in the project, and looking forward to more like this, I''d like to clean up, by putting them in /views/common/. Doesn''t seem to work. Nothing is rendered, and the last log line says: Rendered ./common/_footer Is it true that you can relative-path partials, but only up the directory tree, not back down? Is there some other approach that''s more natural to rails? Thanks much, Dave Merrill
(Just getting started w rails, web app dev for a long time...) I have some partials that are common across multiple controllers. They''re not universal, so they don''t belong to be part of these controllers'' layouts. It appears that I can put them at the root of /views/, and render them using a relative path, like so: <%= render :partial => "./footer" %> But this leaves a bunch of files at the root of /views/. It''s early in the project, and looking forward to more like this, I''d like to clean up, by putting them in /views/common/. Doesn''t seem to work. Nothing is rendered, and the last log line says: Rendered ./common/_footer Is it true that you can relative-path partials, but only up the directory tree, not back down? Is there some other approach that''s more natural to rails? Thanks much, Dave Merrill