You’re not receiving notifications from this thread.
Conditionals in Ruby Discussion
Feels a bit basic, but maybe that's a sign that I'm not exactly a beginner.
Great video Collin, thanks for the time and effort put into this (and all the others!)
if you wanted to add another service in the PASSWORD_VAULT, would that be a nested hash right? how would that look?
Nice job Collin! I like the use of 'hash' manipulations within the conditional examples! : )
Hey Collin, thanks!
I remember to have seen a one line if statement that evaluates only one thing, for instance if this is not true do this, without providing else. Is that possible or I am mixing languages up?
You can absolutely do just a single
if without an
else clause in it. You have two forms that you can write such conditionals. The first is the traditional style, for example:
puts "Hello, world!"
The second being the modifier form, which allows you to write such conditionals on a single line like so:
puts "Hello, world!" if true
Hope that helps!
The Ruby extension in the video is now deprecated. VSCode recommends Ruby LSP from Shopify. Do you recommend that as well now or something else?
This was really cool. I loved this. Seems like it was perfect timing and fit nicely with the rest of the stuff. Really pus everything we've learned into the proper perspective. Too many teaching platforms only show you snippets and not a full program but I think that is literally what has left too many gaps and questions in my learning making me have to forever try to keep digging up more info until I could piece it all together myself, which as you could probably imagine, just was not happening!! Putting this together beginning to end did the trick. Real word examples of a full program with working code. Awesome. Thank you so much for this. I can't wait to get my hands dirty in the rest of the course and all the Rails courses this site offers. If all he other material is like this one I am sure I will learn a lot.
Hey Jessica! Thank you so much for the extremely kind words regarding this lesson! Your comment made my day and I'm very happy to hear that showing things in the context of an actual project really made it click for you. As we add more lessons to this path, I will keep this in mind and try to continue showing and exploring concepts in this way.