Class: StatusController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- StatusController
- Defined in:
- app/controllers/status_controller.rb
Overview
COPYRIGHT:
Copyright (c) 2005-2009 North Carolina State University
Developed with funding for the National eXtension Initiative.
LICENSE:
BSD(-compatible)
see LICENSE file or view at http://about.extension.org/wiki/LICENSE
Instance Method Summary (collapse)
- - (Object) crash
-
- (Object) debug
prints out session information.
- - (Object) version
Methods inherited from ApplicationController
#content_date_sort, #do_404, #do_410, #do_invalid_page, #get_county_options, #get_location_options, #mobile_detection, #set_analytics_visitor, #set_app_location, #set_default_request_ip_address, #set_locale, #set_request_url_options, #unescape_params
Methods included from ControllerExtensions
#check_openidurl_foruser, #log_user_activity, #validate_datepicker
Methods included from AuthLib
#current_person, #set_current_person
Instance Method Details
- (Object) crash
27 28 29 |
# File 'app/controllers/status_controller.rb', line 27 def crash render(:layout => false,:template => 'status/version') end |
- (Object) debug
prints out session information
32 33 |
# File 'app/controllers/status_controller.rb', line 32 def debug end |
- (Object) version
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/status_controller.rb', line 11 def version @deploy = Hash.new fname = 'REVISION' if File.exists?(fname) stat = File.stat(fname) @deploy['date'] = stat.ctime @deploy['revision'] = File.read(fname) @deploy['userid'] = stat.uid userinfo = Etc.getpwuid(stat.uid) @deploy['username'] = userinfo.name end # tests db connection @deploy['schema_version'] = ActiveRecord::Base.connection.select_value('SELECT MAX(CONVERT(version,UNSIGNED)) FROM schema_migrations').to_i render(:layout => false) end |