开发者

rendering a pdf with rails-latex that has no corresponding html view

I'm trying to find a replacement for rtex in rails 3 and found rails-latex开发者_StackOverflow社区. In the example application in the git repository the following link in index.html.erb renders a pdf file using the latex code in index.pdf.erb:

<%= link_to "print", latex_example_path(:format => :pdf) %>

Is it also possible to generate a pdf file from let's say article_list.pdf.erb if there's no article_list.html.erb? Do I have to change my routes for the problem? At the moment I only have the following route: match ':controller(/:action(/:id(.:format)))'

Thanks for your help!


When you are asking for a URL in a specific format, it will render this format regardless of the other format templates. Please try it and ask again if not working.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜