public
Description: components + scaffolding == presentations
Homepage: http://codelevy.com/
Clone URL: git://github.com/cainlevy/presenting.git
cainlevy (author)
Fri Jul 31 10:46:24 -0700 2009
commit  064f85f8c6acb712a9abe79a1b23d3ee076242e2
tree    e19577076e277cf4c1a7697b3ea8ca8574479900
parent  538576874e6cfc2e0973af3b850bf8b2b0880aec
presenting / init.rb
100644 13 lines (11 sloc) 0.624 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
ActionView::Base.class_eval { include Presenting::Helpers }
ActionController::Base.const_set(:Search, Presenting::Search)
ActionController::Base.const_set(:Sorting, Presenting::Sorting)
ActionView::Helpers::FormBuilder.class_eval { include Presenting::FormHelpers }
 
if defined? Rails # because tests don't define the Rails module
  if Rails.version.match(/^2\.2/)
    ActionController::Base.view_paths << File.join(File.dirname(__FILE__), 'app', 'views')
    ActiveSupport::Dependencies.load_paths << File.dirname(__FILE__) + '/app/controllers'
    $LOAD_PATH.unshift File.dirname(__FILE__) + '/app/controllers/'
  end
end