Greg Molnar Profile picture
OSCP Certified Penetration tester and a Ruby Developer since 2010 My Course: https://t.co/gRrmHKywHG
Aug 23, 2022 6 tweets 2 min read
3 simple Rails security improvements you can do with a few minutes investment:

🧵👇 Even though Rails has secure defaults, there are still plenty of ways to shoot yourself in the leg, or to get compromised.
If you incorporate these 3 simple changes to your application, you will level up your application's security posture.
Aug 9, 2022 6 tweets 2 min read
Did you know that you can create a single-file Rails application?

You shouldn't unless you are experimenting with something, but here is how it can be done:

🧵 👇 Let's create a file and call it "app" with the "ru"(rackup) extension. Then we need to use bundler inline to install the dependencies:
Jun 8, 2022 7 tweets 2 min read
One of Ruby's great features is method chaining.
For instance, Active Record heavily relies on this and method chaining enables us to do cool things like User.where("active = 1").count.
Have you ever wondered how is that possible?
Let's look into it, it is pretty simple.
🧵👇 Let's use a simple example of having a user model and you want to be able to set a default password for your user when they signup via OAuth. So you want to be able to do something like this in your controller:
May 31, 2022 5 tweets 2 min read
Are you learning Ruby? Do you want to improve your Ruby skills?

I collected are a few old but great books you can read for free!

🧵👇 Learn Ruby the Hard Way by Zed A. Shaw
Zed has a really good style to teach Ruby from the basics.
learnrubythehardway.org/book/