我在视图/用户/显示中有此链接:
<%= link_to "Photos (#{@user.photos.count})", user_path(@user), id: "photo_link", remote: true %>
现在,当我单击上面的链接时,我想将 [1..6] 更改为 [1..-1] 而不在视图/用户/显示中重新渲染:
<section id="photo_galery">
<% unless @user.photos[0].nil? %>
<% for photo in @user.photos[1..6] %>
<%= link_to image_tag(photo.photo.url(:subprofile_thumbnail), id: "subpics"), photo.photo.url(:original), id: "subprofile_photos", class: "fancybox", rel: "gallery01" %>
<% end %>
<% end %>
</section>
我怎样才能做到这一点?谢谢!