Module: Lilypad::Rails

Defined in:
lib/lilypad/adapters/rails.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/lilypad/adapters/rails.rb', line 4

def self.included(base)
  ENV['RACK_ENV'] = ENV['RAILS_ENV']
  if Lilypad.production? && !base.included_modules.include?(InstanceMethods)
    base.send :extend, ClassMethods
    base.send :include, InstanceMethods
    base.send :alias_method_chain, :rescue_action, :lilypad
    base.class_eval do
      class <<self
        alias_method_chain :call_with_exception, :lilypad
      end
    end
  end
end