Submitted over 2 years ago
(1:10pm - 2:10pm)
* I worked on adding some additional authentication to my budget app so that it's no longer possible to enter a different user's ID in the URL and view their profile and budgets, but didn't get it done in my hour
* Outside of my hour of coding at my lunch break, I also watched a 55-minute video to review on some of the basics of Ruby
I have authentication here on my blog that requires an admin login to add or edit posts, but it uses Devise and I'd like to complete this task myself if I can.
Today I focused on trying to write a
correct_user? helper method, but I was struggling to think of a place I could grab the id of the user that was supposed to be logged in to compare to the id of user that was stored in the browser session - as soon as I changed the URL to include the id of a different user, it seemed to change the id stored in the session params too. Here are some notes I made to myself when thinking more about this problem after my lunch break:
*add another hashed authentication code, but if it's saved in the browser I think it will just change when the user id in the URL changes
*somehow pass the user id from the login form and store it in a cookie ?
*look at devise code and figure out how they authenticate users
*also should update users resource so that navigating to users/id# doesn't work
The thumbnail for the Ruby video I watched said "LEARN RUBY IN ONE VIDEO" and it was pretty comprehensive on the basics. Even though I've been over that stuff so many times, it was still nice to review the foundational info and hear another person's reasoning for why certain features are helpful or what they use them for most often. As I was watching I was imagining content that I could pull out and add to flashcards if I decide to make a flashcards app at some point.
I've also been thinking today whether I should try working in another language into my portfolio. I want to focus on and get really good at Ruby and Rails, but I also want to show potential interviewers that I have the capacity to learn multiple languages, so I'll continue thinking on that one.
Also I really want to take some time to research this asset precompilation issue for my blog and see what I can do to get Heroku to just hold on to my CSS preferences forever.
Link to work
* Just my daily asset precompilation commit: https://github.com/twoesplease/personal_site_blog/commit/2eae9164f54ee20521a5a7299c69dfad0ba57994