简体   繁体   中英

Rails- index page

Ok, I am trying to make an instagram clone but the problem is that when I create a post it doesn't accept the title and on the index page it should display the title but it displays the pic_id here is the code on the index page

-@pics.each do |pic|
  %h2= link_to pic.title, pic
  = link_to "Gram it", new_pic_path

only to test, try inspect the pic object to be sure that title is filled right:

<% @pics.each do |pic| %>
<%= pic.inspect %>
<% end %>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM