18 Jul How to find the source declaration of any method in Ruby?
Let’s say you want to see where it is declared the method `last` from ActiveRecord, you can do so
Just as simple as:
1 | MyModel.method( :last ).source_location |
There you go
Let’s say you want to see where it is declared the method `last` from ActiveRecord, you can do so
Just as simple as:
1 | MyModel.method( :last ).source_location |
There you go
You must be logged in to post a comment.
No Comments