Code Snippets

Some useful iRb command for Rails

When debugging Rails, I often open up an iRb shell by typing

[BASH]

ruby script/console

[/BASH]

This command lists all instance methods in the User model, excluding inherited methods and sorts them in alphabetical order.

[BASH]

User.instance_methods(false).sort

[/BASH]

I will add more useful iRb methods as I discover and remember them