metamaps--metamaps/config/initializers/access_codes.rb

4 lines
177 B
Ruby
Raw Normal View History

$codes = []
if ActiveRecord::Base.connection.table_exists? 'users'
$codes = ActiveRecord::Base.connection.execute("SELECT code FROM users").map {|user| user["code"] }
end