Iterating over the @following_activities instance variable is giving me
errors for user.avatar.url and user.post. I don't understand why it's
not collecting all of the information from the user object.
<% if @following_activities.any? %>
<% @following_activities.each do |user| %>
<%= link_to(image_tag(user.avatar.url(:thumb), style:
'text-decoration: none;', class: 'round-image-50-trendy-warrior'),
user_path(user)) %>
<%= user.post.username %>
<%= user.post.body %>
<%= image_tag(user.post.photo.url(:medium), style: '') %>
<% end %>
<% else %>
<h1>No new posts</h1>
<% end %>
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8a06021c43b603b07ed4c52ff1e36142%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment