Class: StatusCat::Checkers::ActiveRecord
- Defined in:
- lib/status_cat/checkers/active_record.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ ActiveRecord
constructor
A new instance of ActiveRecord.
Methods inherited from Base
Constructor Details
#initialize ⇒ ActiveRecord
Returns a new instance of ActiveRecord.
5 6 7 8 9 10 11 12 13 |
# File 'lib/status_cat/checkers/active_record.rb', line 5 def initialize config = ::ActiveRecord::Base.connection_config @value = "#{config[ :adapter ]}:#{config[ :username ]}@#{config[ :database ]}" @status = fail_on_exception do ::ActiveRecord::Base.connection.execute( "select max(version) from schema_migrations" ) nil end end |