Class: Rendition::System
- Inherits:
-
Object
- Object
- Rendition::System
- Defined in:
- lib/rendition/system.rb
Class Method Summary collapse
Class Method Details
.app_local_presenter_glob ⇒ Object
3 4 5 |
# File 'lib/rendition/system.rb', line 3 def self.app_local_presenter_glob 'app/presenters/**/*_presenter.rb' end |
.load_app_local_presenters ⇒ Object
7 8 9 10 |
# File 'lib/rendition/system.rb', line 7 def self.load_app_local_presenters presenter_files = Dir[ "#{ Rails.root }/#{ app_local_presenter_glob }" ] presenter_files.each { |d| require_dependency d } end |
.setup(component) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rendition/system.rb', line 12 def self.setup(component) if component == :action_controller #ActionController::Base.send(:include, Rendition::ViewContextFilter) ActionController::Base.send(:include, Rendition::ActionSupport) #ActionController::Base.extend(Rendition::HelperSupport) elsif component == :action_mailer #ActionMailer::Base.send(:include, Rendition::ViewContextFilter) ActionMailer::Base.send(:include, Rendition::ActionSupport) end end |