class Sqreen::Frameworks::Rails3Framework

Handle Rails 3 specifics

Public Instance Methods

instrument_when_ready!(instrumentor, rules) click to toggle source
# File lib/sqreen/frameworks/rails3.rb, line 23
def instrument_when_ready!(instrumentor, rules)
  config = Rails.configuration
  if config.cache_classes
    instrumentor.instrument!(rules, self)
  else
    # FIXME: What needs to be done if no active_record?
    # (probably related to SQREEN-219)
    frm = self
    ActiveSupport.on_load(:active_record) do
      instrumentor.instrument!(rules, frm)
    end
  end
end
prevent_startup() click to toggle source
# File lib/sqreen/frameworks/rails3.rb, line 16
def prevent_startup
  res = super
  return res if res
  return :rails_console if defined?(Rails::Console)
  nil
end
root() click to toggle source
# File lib/sqreen/frameworks/rails3.rb, line 12
def root
  Rails.root
end