Activity
Hey Gary, initially I was going to hook into the get fetch step and provide an interface there to provide an option of how to proceed based on the fetch but for this initial pass at building this out a single git pull would have probably been a good call and then build out from there. Thanks for the question! Always nice to get another perspective and reflect back on decisions :)
Posted in Conditionals in Ruby Discussion
I would also recommend the Ruby LSP from Shopify if you're going to be using VSCode. They are putting a lot of work into that and it seems that that work is only going to continue and the extension become better and better.
Posted in Arrays in Ruby Discussion
Any scenario where you want to forgot to save the last thing returned in your console or IRB session to a variable. You can also call methods on _ and they will be sent to whatever the last returned object/result was from your console session.
Posted in See a list of videos I've completed?
Yep! Check it out here:
https://gorails.com/completed
I'll make sure we improve the discoverability of this page by adding a link to it in the dropdown or something. Thanks for asking about this!
Hey Becky! Thanks a bunch, I'm glad you enjoyed it. And yes, fail is a handy one to have in your pocket! Also, if you want to do a similar thing but not cause the big error screen in the browser, you can replace <% fail %> with <% console %> and be able to look at instance variables and such in the console but also see your beautiful app! Both methods are available in your controllers as well :)
No problem! I hope that clears it up for you, Diego!
Hey Diego, the **kwargs parameter is added to the method signature so that you can pass a hash of options to the favicon_image_tag method which will then be forwarded along to the image_tag method. This allows you to be able to pass different options (kwargs) wherever you call the favicon_image_tag method to customize attributes of the image_tag method. Hope that helps!
Posted in How to get from starter to advanced?
There is another section in the path for getting started with Rails along with other things. But the path is where we point everyone to for what you are looking for. Here is the link to where the Rails specific lessons start: https://gorails.com/path#level-two
Posted in Strings in Ruby Discussion
Which link are you looking for?
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!