Tutorials

Avoid test delays and speed up your development cycle by mocking callbacks
Mocking is one way to achieve isolation in tests. It is the practice of using a fake object in place of a collaborator object. In the simplest case, a mock will accept a method call, do nothing, and return a value (usually nil in Ruby). Mocks can ...



Scraping Buy: Scripting for a Purchase - Kevin Murphy
The piece of code I’ve written in the last two months most interesting to me isn’t anything I’ve done for work. It isn’t anything I wrote to find a new job. It doesn’t have tests. It doesn’t even have a class. It’s dirty, not up to my standards, a...

Episode 14 Rodauth Authentication in Ruby on Rails - YouTube
Today, we will learn how to authenitcate our Applications with Rodauth. Rodauth is Ruby's most advanced authentication framework, designed to work in any rack application. It's built using Roda and Sequel, but it can be used with other web framewo...


Benefits of Having a Call Method for Your Ruby Object
Exploiting Ruby’s Object Model to Ease CollaborationOne of the common patterns I use in my day-to-day Ruby coding is to define a module or level call method. I like to establish these call methods as crisp interfaces between different concerns.Dep...

4 things you can try before using a counter cache in rails
Maybe you have heard about the counter cache feature.A counter cache makes finding the number of belonging objects more efficient by keeping a column with the count.Rails makes it easy to implement it, but is not free. Sometimes it may be better n...
