Top Level Namespace

Defined Under Namespace

Modules: ActiveRecord, Appcelerator, RequestMixin, ServiceBroker

Constant Summary collapse

APP_VERSION =
'2.0.2'
APP_SERVICES =
Array.new

Instance Method Summary collapse

Instance Method Details

#log_to(stream) ⇒ Object

trick to allow changing ActiveRecord logging stream



38
39
40
41
# File 'lib/appcelerator.rb', line 38

def log_to(stream)
  ActiveRecord::Base.logger = Logger.new(stream)
  ActiveRecord::Base.clear_active_connections!
end

#log_to_stdoutObject

shortcut to turn on logging to stdout



46
47
48
# File 'lib/appcelerator.rb', line 46

def log_to_stdout
   log_to STDOUT
end

#model_name(name) ⇒ Object



11
12
13
# File 'lib/appcelerator.rb', line 11

def model_name(name)
  name.to_s.gsub(/[::]{2}/,'.').split('.').collect {|token| token.underscore }.join('.')
end

#silence_warningsObject



15
16
17
18
19
20
# File 'lib/appcelerator.rb', line 15

def silence_warnings
 	old_verbose, $VERBOSE = $VERBOSE, nil
 	yield
ensure
 	$VERBOSE = old_verbose
end