or copy paste less and debug faster What does this pry command do? • Replay code from files & methods as if they were entered directly in the Pry REPL How to use this command? • To execute a single line of code: play -l 32 • To execute multiple lines of code: play -l 32..35 Bonus The command is very easy to remember!
the program to run to the end disable-pry What does this pry command do? Once this command is run • Any further calls to pry return nil • The program flow will not be interrupted How to use this command? • disable-pry The Catch!
wrong while entering a multi-line expression ◦ The read loop will never terminate • Command will ◦ Enable normal input to resume without having to restart the server What does this pry command do? • Clears the input buffer and breaks out of the read loop • Allows normal input to resume on the next line How to use this command? • ! yes, that’s it :) !
To require a file/library in IRB • Command: alias re require To relatively require a file/library in IRB • Command: alias rer require_relative Handy aliases one could add in their .irbrc
when creating a new rails app • You no more have to explicitly specify them like - rails new new_app_name --skip-test --skip-turbolinks --database=postgresql Leveraging defaults for a new rails app through options defined in .railsrc How? • Edit your .railsrc file and add the following commands ◦ To use Postgres DB: --database=postgresql ◦ Skip test unit: --skip-test ◦ Skip Turbolinks: --skip-turbolinks • Place the .railsrc file in the home directory of your computer