Nugi Nugraha wrote in post #1175693:
> On Fri, Jun 26, 2015 at 7:20 AM, David Williams <li...@ruby-forum.com>
> wrote:
>
>> unless: avatar.nil?) %></li>
>>
>
> I think error message is obvious
> you got that error because @user was nil
> if you're using devise, you can try this instead
> "current_user.avatar.url(:thumb)"
>
>
> --
> Mou Dareka no, tame janakutte
> Jibun no Tame ni Warette Iru
>
> ( Aqua Timez - Alones )

I'm getting this error in my logs file. The current_user is signed in 
btw.

User Load (1.0ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = ? 
ORDER BY "users"."id" ASC LIMIT 1  [["id", 3]]
Completed 500 Internal Server Error in 2302ms (ActiveRecord: 2.0ms)

NameError - undefined local variable or method `avatar' for 
#<#<Class:0x58867e0>:0x5885d78>:

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

Reply via email to