LoginSignup
2
2

More than 5 years have passed since last update.

Rails Console Tips, Open source code with Sublime Text

Posted at

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)
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2