使用 iframe 时,我总是得到一个空页面。我在src中放置了包含用于创建复选框的代码的 Haml 文件的位置:
视图.haml:
%iframe{:src => "file:///home/marina/project/app/views/blog_posts/new2.haml"}
新2.haml:
%h1 popup
br
%input{:name => "option1", :type => "checkbox", :value => "Milk"}
Milk
%br
%input{:name => "option2", :type => "checkbox", :value => "Butter"}
Butter
%br
%input{:name => "option3", :type => "checkbox", :value => "Cheese"}
Cheese
%br