This project is archived and is in readonly mode.
Layouts with absolute path not found
-
Steve Quinlan
Attempted to get a failing test for this but got into a horrible muddle over view paths. Here's my attempt, perhaps someone else can build on it:
#here's my attempt at the fixture class AbsolutePathLayoutController < LayoutTest def hello template_path = File.dirname(__FILE__) + '/../fixtures/layout_tests/alt/hello.rhtml' layout_path = File.dirname(__FILE__) + '/../fixtures/layout_tests/alt/layouts/alt.rhtml' render :file => template_path, :layout => layout_path end end #and here's my attempt at the test def test_should_work_with_absolute_path @controller = AbsolutePathLayoutController.new get :hello assert_response 200 end -
thedarkone
- Assigned user set to josh
Templates outside view_paths are a hack, layouts are kinda hackish, so here we are.. having fun with this mess again :).
0001-clean-Fix-layouts-with-absolute-paths.patchhopefully a clean fix, we just keep thepick_layoutedlayout template around without going throughview_pathstwice (should also give tiny speed up). This might break some obscure behavior, I have no idea...0001-hackish-Fix-layouts-with-absolute-paths.patchkeeps a status quo and just hacks around the issue of non-view_pathstemplates. -
Repository
- State changed from new to resolved
(from [3191535ff0912e751dcf411c57923ec79b72944d]) Fix layouts with absolute paths [#2134 Layouts with absolute path not found state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
