Colin Law wrote in post #1181852:
> On 2 March 2016 at 21:43, David Williams <lists@ruby-forum.com> wrote:
>> 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| %>
>
> In the code you posted earlier the activities are Post objects not
> User objects. Possibly you want
> @following_activities.each do |post|
> and then post.user.photo.... etc
>
> Colin
It's working now. Thank you and Mahcsig for helping me.
--
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/7519ae9bd5b199cf223e513ad94674b4%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment