使用iframe时,我总是得到一个空白页面.我在src中放置了包含代码的Haml文件的位置以创建复选框:
view.haml:
%iframe{:src => "file:///home/marina/project/app/views/blog_posts/new2.haml"}
Run Code Online (Sandbox Code Playgroud)
new2.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
Run Code Online (Sandbox Code Playgroud)