Module: Charcoal::JSONP

Defined in:
lib/charcoal/jsonp.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/charcoal/jsonp.rb', line 5

def self.included(klass)
  klass.extend(ClassMethods)
  if klass.respond_to?(:prepend_around_action)
    klass.prepend_around_action :add_jsonp_callback
  else
    klass.prepend_around_filter :add_jsonp_callback
  end
end