4 ms·
(note: I use both Elixir & Ruby, for different reasons) You can most of the time rely on object.method(:blank?).source_location to quickly determine where a sp
by thibaut_barrere 9y ago
(note: I use both Elixir & Ruby, for different reasons)
You can most of the time rely on object.method(:blank?).source_location to quickly determine where a specific method is defined.
More useful debugging tips can be found here:
https://www.schneems.com/2016/01/25/ruby-debugging-magic-cheat-sheet.html https://www.schneems.com/2016/01/25/ruby-debugging-magic-che...
- nitrogen 9y agoIf you use Pry with Rails, you can also call binding.pry before the method in question, then type show-method [methodname] in the Pry console.