27 Nov 2012
Ffs where is this function defined?
versions: Ruby 1.9.3
When I’m building an app with Rails, I sometimes want to know where exactly is this method defined.
Like when I was using current_page?
view helper, I wanted to check the code of it, and check what happens if I added some code to it.
When u write method(:current_page?).source_location
, you’ll get where the function is defined like below.
Pretty useful.
Takehiro Adachi at 15:05