Add this to your .irbrc
or .pryrc
:
class Object
def subl(method_name)
file, line = method(method_name).source_location
`subl "#{file}:#{line}"`
end
end
Try it out in Rails console:
helper.subl(:number_to_currency)
More than 5 years have passed since last update.
Add this to your .irbrc
or .pryrc
:
class Object
def subl(method_name)
file, line = method(method_name).source_location
`subl "#{file}:#{line}"`
end
end
Try it out in Rails console:
helper.subl(:number_to_currency)
Register as a new user and use Qiita more conveniently