Frank-0.3.0
When I tried to use frankout to compile the project, it failed with an error.
/Library/Ruby/Gems/1.8/gems/frank-0.3.0/lib/frank/base.rb:106:in `render': Template not found /Users/marcoy/tmp/Test/dynamic/_testpartial.html (Frank::TemplateError).
I looked into the code a bit and realized the method to_file_path() is not called if it is not running with Rack. The reason it failed is because, in the view the partials don't include file extensions, and render() normalizes the path by adding ".html" extensions to the partials; at the same time, to_file_path() is not called to try to find the corresponding templates in dynamic/
A quick hack I did was to change line 97 of base.rb to the following:
path = to_file_path(path) if defined? @request or path.end_with?('.html')
Frank-0.3.0 When I tried to use frankout to compile the project, it failed with an error. /Library/Ruby/Gems/1.8/gems/frank-0.3.0/lib/frank/base.rb:106:in `render': Template not found /Users/marcoy/tmp/Test/dynamic/_testpartial.html (Frank::TemplateError).
I looked into the code a bit and realized the method to_file_path() is not called if it is not running with Rack. The reason it failed is because, in the view the partials don't include file extensions, and render() normalizes the path by adding ".html" extensions to the partials; at the same time, to_file_path() is not called to try to find the corresponding templates in dynamic/
A quick hack I did was to change line 97 of base.rb to the following: path = to_file_path(path) if defined? @request or path.end_with?('.html')
Marco