Activity
Posted in Classes & Objects in Ruby Discussion
Hey Alex! I'll try to get that modules video out this week. From here, I would say if you don't feel comfortable with SQL I would say to go the that series in the learning path next. If you are comfortable in SQL, then you should be able to move into the Rails series in the learning path and start working through the projects.
Posted in Organizing Rails Model Files Discussion
Thanks, Terry! Glad you liked this one.
Thanks for sharing that annotate config! I've actually never looked into if there was an alternative to placing the comments at the top so this is great to know now.
Posted in Strings in Ruby Discussion
It's a lot of work going back and forth but oh the things we do for love ;)
Posted in Patching Models for Ransack 4.0.0: Extending ActiveRecord for Gem Compatibility Discussion
Thanks for reading, Urban!
Posted in Conditionals in Ruby Discussion
Hey Alessandro,
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:
if true
puts "Hello, world!"
end
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!
This a good one that I run every so often to check for any old databases laying around that I can get rid of, so good call on mentioning it!
Posted in Hashes in Ruby Discussion
It's a good one for sure! ;)
Ok, you should be able to access the videos now. Sorry about that!
Whoops! Looking into this now, should be fixed soon, sorry about that.
Posted in Conditionals in Ruby Discussion
Hey Marissa,
Yep exactly right! The hash itself would look something like this:
PASSWORD_VAULT = {
"service one" => {
"username" => "Collin",
"password" => "supersecret"
},
"service two" => {
"username" => "other_collin",
"password" => "supersupersecret"
}
}
Posted in Adding Scheduled Blog Posts Discussion
The scopes work at the class level, so those will get you a collection of BlogPost records that are all either drafts, published, or scheduled.
The helpers are instance methods, designed to be used with a single blog post instance/record.
The helpers/instance methods are nice because it will not always be the case that you want a collection of draft posts, for example, you may be on the show page for a particular blog post and you could then use the helpers/instance methods to check the published_at status of that particular blog post instance.
Hope that helps!
Posted in Ruby Scripts & IRB Discussion
Definitely! Idk if I mentioned it in the video or not but you can go up the list with shift tab. 😎
Posted in Classes & Objects in Ruby Discussion
Thanks a bunch, Muhammad! I'm hoping to get the module video out in the very near future.
Posted in Hashes in Ruby Discussion
Hey Yago, while this is true, HashWithIndifferentAccess is only available via ActiveSupport. This section of the learning path is focused purely on Ruby.
Well, looked into it further. Def a bug. Rails doesn't like when you try to send that stuff through with the keys for the tasks as dom_id's which is a bummer. I got a fix you can see here https://github.com/gorails-screencasts/dynamic-nested-forms-with-turbo-get/commit/adfe726005c89f1c71b81f1ddf63c797bddad80a
I'm gonna look into this more when a have some free time to see what else can be done here bc I feel like there's a better option. Sorry about that but thanks for bringing it up, Willard!
Hmmm, I not sure but let me look into that for you and report back!
Awesome! Glad to hear that Giedrius!
Posted in Law of Demeter and Delegation Discussion
Another wonderful comment, Ann! :) Thanks for the kind words, glad you appreciate the vibes and video as well!
Hey there, I appreciate the comment. I do address this in the video though in addition to being able to use debugger
instead of / in addition to binding.break
.
Hey Nick, that was a scheduling mistake on our end. That video won't be out until August. Sorry for the confusion!