nulogy/fitter-happier

View on GitHub
app/helpers/fitter_happier/database_check.rb

Summary

Maintainability
A
0 mins
Test Coverage
module FitterHappier
  module DatabaseCheck
    def self.schema_version
      query = "SELECT max(lpad(version, 20, '0')) FROM schema_migrations"
      ActiveRecord::Base.connection.select_value(query).to_i
    end
  end
end