Module: Avataree

Defined in:
lib/avataree/image.rb,
lib/avataree.rb,
lib/avataree/switch.rb,
lib/avataree/profile.rb,
lib/avataree/railtie.rb

Overview

encoding: utf-8

Defined Under Namespace

Modules: ImageServices, ProfileServices Classes: Railtie

Class Method Summary collapse

Class Method Details

.enable!Object



5
6
7
8
# File 'lib/avataree/switch.rb', line 5

def enable!
  enable_for_controller!
  enable_for_views!
end

.enable_for_controller!Object



10
11
12
13
14
# File 'lib/avataree/switch.rb', line 10

def enable_for_controller!
  #hook for ActionController
  ActionController::Base.send(:include, Avataree::ImageServices)
  ActionController::Base.send(:include, Avataree::ProfileServices)
end

.enable_for_views!Object



16
17
18
19
# File 'lib/avataree/switch.rb', line 16

def enable_for_views!
  #hook for ActionView
  ActionView::Base.send(:include, Avataree::ImageServices)
end