如果我在haml中执行以下行
%input#project_images{:name => "project[project_images]", :type=>'text', :value => @project_images.join(',') }/
我的projects_controller
返回params[:project][:project_images]
为空字符串""
另一方面,如果我使用rails快捷键:
= text_field( :project, :project_images, :value => @project_images.join(','))
它可以工作,并返回一个字符串"1,2,3"
以下是来自两个不同行的输出html
<input id="project_images" name="project[project_images]" type="text" value="1,2,3">
<input id="project_project_images" name="project[project_images]" size="30" type="text" value="1,2,3">