Sha256: 9b21ad8457b1b69be2c8629529e84d5f813de3a20fbf987d03735facbee19a94
Contents?: true
Size: 707 Bytes
Versions: 1
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) rescue nil end @public_columns_hash = {} descendants.each do |model| @public_columns_hash[model.name] = model.columns_hash end @public_columns_hash end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hyper-mesh-0.4.0 | lib/reactive_record/active_record/public_columns_hash.rb |