Skip to content

Instantly share code, notes, and snippets.

@kmdsbng
Created August 23, 2011 03:22
Show Gist options
  • Select an option

  • Save kmdsbng/1164265 to your computer and use it in GitHub Desktop.

Select an option

Save kmdsbng/1164265 to your computer and use it in GitHub Desktop.
.pryrc に書いておく。rails consoleみたく、reload!を使えるようにする用。
# reloads the environment
# to read rails env => $ pry -r pry -r ./config/environment.rb
def reload!(print=true)
puts "Reloading..." if print
# This triggers the to_prepare callbacks
ActionDispatch::Callbacks.new(Proc.new {}, false).call({})
true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment