Guest User

Untitled

a guest
May 26th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. require 'rubygems'
  2. require 'hirb'
  3.  
  4. Hirb::View.enable
  5. if rails_env = ENV['RAILS_ENV']
  6. rails_root = File.basename(Dir.pwd)
  7. IRB.conf[:PROMPT] ||= {}
  8. IRB.conf[:PROMPT][:RAILS] = {
  9. :PROMPT_I => "#{rails_root}> ",
  10. :PROMPT_S => "#{rails_root}* ",
  11. :PROMPT_C => "#{rails_root}? ",
  12. :RETURN => "=> %s\n"
  13. }
  14. IRB.conf[:PROMPT_MODE] = :RAILS
  15.  
  16. IRB.conf[:IRB_RC] = Proc.new do
  17. ActiveRecord::Base.logger = Logger.new(STDOUT)
  18. end
  19. end
  20. IRB.conf[:SAVE_HISTORY] = 10000
Add Comment
Please, Sign In to add comment