Profile route is broken
jclopezdev opened this issue · comments
Steps to reproduce
-- Click in the profile name in the navbar
-- You're going to be redirected to the profile route getting an error
https://til.magmalabs.io/author/19
Expected behavior
Load the profile route
Actual behavior
System configuration
Operating System:
macOS Big Sur
Browser:
Chrome
backtrace:
2021-02-20T00:09:01.995010+00:00 app[web.1]: [73c8715e-65b6-43ff-989c-cb0a0bfa02e5] Rendered developers/show.html.haml within layouts/application (6.3ms)
2021-02-20T00:09:01.996038+00:00 app[web.1]: [73c8715e-65b6-43ff-989c-cb0a0bfa02e5] Completed 500 Internal Server Error in 8ms (ActiveRecord: 1.1ms)
2021-02-20T00:09:01.997116+00:00 app[web.1]: [73c8715e-65b6-43ff-989c-cb0a0bfa02e5]
2021-02-20T00:09:01.997185+00:00 app[web.1]: [73c8715e-65b6-43ff-989c-cb0a0bfa02e5] ActionView::Template::Error (undefined method `username' for nil:NilClass):
2021-02-20T00:09:01.997447+00:00 app[web.1]: [73c8715e-65b6-43ff-989c-cb0a0bfa02e5] 1: - content_for :page_title, "Posts by #{developer.username}"
2021-02-20T00:09:01.997448+00:00 app[web.1]: [73c8715e-65b6-43ff-989c-cb0a0bfa02e5] 2: %section#author.profile
2021-02-20T00:09:01.997448+00:00 app[web.1]: [73c8715e-65b6-43ff-989c-cb0a0bfa02e5] 3: %header.page_head
2021-02-20T00:09:01.997449+00:00 app[web.1]: [73c8715e-65b6-43ff-989c-cb0a0bfa02e5] 4: = image_tag "https://www.gravatar.com/avatar/#{Digest::MD5.hexdigest developer.email}"
Fixed @jclopezdev
Wanna gimme a review on the PR? #34
Steps to reproduce
-- Click in the profile name in the navbar
-- You're going to be redirected to the profile route getting an error
https://til.magmalabs.io/author/19Expected behavior
Load the profile route
Actual behavior
System configuration
Operating System:
macOS Big SurBrowser:
Chrome
Good catch! Thanks for opening the issue!
Hey @fedgut I'm still getting the same 500 error clicking on my username link, I already log out and log in again but I'm still getting the error, please let me know if you need more info
Hello @jclopezdev! Could you give it another try?
@fedgut yep, it's working now, thanks! 👍