Ruby on Rails Sunday, April 10, 2016

Colin Law wrote in post #1182722:
> On 9 April 2016 at 23:57, David Williams <lists@ruby-forum.com> wrote:
>> _post.html.erb
>>
>> <%= @post.user.username.capitalize %>
>
> As always it is best to paste the complete error message and tell us
> which line it refers to. If it is the line above that is saying
> undefined method 'user' for nil:NilClass
> then that means @post is nil.
>
> Colin

I added the modal before the end block, and then I used the larger image
inside of the modal body (instead of the partial posts/post partial).
The problem with that approach is that it doesn't work for more than one
post. I need the modal button to listen for changes, so that it can open
up with new content.

--
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/2052bd8d2ef35152f8e0707a58c0524e%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment