3 ms·
One of my favorite perks of Phoenix vs Rails is no wasted time trying to figure out where the heck a method/function came from. Is it from the parent class? One
by aczerepinski 9y ago
One of my favorite perks of Phoenix vs Rails is no wasted time trying to figure out where the heck a method/function came from. Is it from the parent class? One of the included modules? Or perhaps not defined anywhere at all, with method missing magic? Going from that to explicit imports is refreshing.
- 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.
- elvio 9y agoThat is a real productivity booster. I also enjoy the clarity and explicitness present in the framework.