Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 自定义数组在rails视图中显示不好_Ruby On Rails_Ruby_Ruby On Rails 3 - Fatal编程技术网

Ruby on rails 自定义数组在rails视图中显示不好

Ruby on rails 自定义数组在rails视图中显示不好,ruby-on-rails,ruby,ruby-on-rails-3,Ruby On Rails,Ruby,Ruby On Rails 3,我有一个自定义的字符串URL数组,我将其添加到图像标签中,如下所示: <%= @attachment.each do |att| %> <div> <%= image_tag att %> </div> <% end %> 图像显示正确,但我在图像下面看到以下垃圾: [”http://localhost:8090/download/attachments/884794/DSC_0006.NEF?

我有一个自定义的字符串URL数组,我将其添加到图像标签中,如下所示:

<%=  @attachment.each do |att| %>
<div>
    <%= image_tag att %>
</div>

<% end %>

图像显示正确,但我在图像下面看到以下垃圾:


[”http://localhost:8090/download/attachments/884794/DSC_0006.NEF? 版本=1&修改日期=1343685834627“http://localhost:8090/download/attachments/885137/Sunflower.gif?version=1&modificationDate=1343720588175", "http://localhost:8090/download/attachments/885140/Spiked.gif?version=1&modificationDate=1343720548736"]

将第一个标签更改为awesome,以及如何在该标签上创建链接?因此,当单击图像时,它会转到一个url?是否也可以传递另一个参数,例如我可以在控制器中使用的pageid?这些数据来自外部xmlrpc调用,因此我不能使用rails提供的功能,或者我可以将数据保存到一个伪rails模型中,并像普通rails模型一样使用它吗?