Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'irb/completion'
- require 'map_by_method'
- require 'what_methods'
- require 'pp'
- IRB.conf[:AUTO_INDENT]=true
- #require 'wirble'
- # start wirble (with color)
- #Wirble.init
- #Wirble.colorize
- def Object.method_added(method)
- return super(method) unless method == :helper
- (class<<self;self;end).send(:remove_method, :method_added)
- def helper(*helper_names)
- returning $helper_proxy ||= Object.new do |helper|
- helper_names.each { |h| helper.extend "#{h}_helper".classify.constantize }
- end
- end
- helper.instance_variable_set("@controller", ActionController::Integration::Session.new)
- def helper.method_missing(method, *args, &block)
- @controller.send(method, *args, &block) if @controller && method.to_s =~ /_path$|_url$/
- end
- helper :application rescue nil
- end if ENV['RAILS_ENV']
- class Object
- def tap
- yield self
- self
- end
- end
Add Comment
Please, Sign In to add comment