Sha256: 4e2ee424b2b9c07749c7bcf83b61ef406668c7a38a32c01c1e454ae1a8c9dbd3
Contents?: true
Size: 707 Bytes
Versions: 4
Compression:
Stored size: 707 Bytes
Contents
module ActiveRecord # adds method to get the HyperMesh public column types # for now we are just getting all models column types, but we should # look through the public folder, and just get those models. # this works because the public folder is currently required to be eaer loaded. class Base def self.public_columns_hash return @public_columns_hash if @public_columns_hash Dir.glob(Rails.root.join('app/models/public/*.rb')).each do |file| require_dependency(file) end @public_columns_hash = {} descendants.each do |model| @public_columns_hash[model.name] = model.columns_hash rescue nil end @public_columns_hash end end end
Version data entries
4 entries across 4 versions & 1 rubygems