How to include all files in a folder in .gitignore except a few
I was wondering how to do this, when I saw that the .gitignore
file autogenerated by Rails already does it:
With that we are ignoring all files in the log folder except the
.keep file.
A better way to loop from a number to a lower number in Ruby
I wanted to iterate from a higher number (hi) to a lower number
(lo), passing a block.
First I tried:
But then I noticed the downto method
🙂
Of course, there is also the related
upto method.
A fast way to check if Rails ActionMailer is sending emails
To check if our mail sending configuration in Rails is configured properly, just fire up a Rails console and paste the following snippet: