binding_irb
💡 Use binding.irb for Interactive Sessions​
Rails 6+ includes binding.irb
out of the box as an alternative to byebug
. When execution hits this call, an IRB session opens, letting you inspect and modify state interactively.
def create
@article = Article.new(article_params)
binding.irb
@article.save!
end