Sha256: d5e53ab86df9386ba3f67a05a2b8273c3c1119c720860a5c28c5c7be6297240a
Contents?: true
Size: 393 Bytes
Versions: 19
Compression:
Stored size: 393 Bytes
Contents
require 'active_support' require 'active_support/core_ext/class/attribute' class LHS::Record module Relations extend ActiveSupport::Concern included do class_attribute :_relations self._relations = {} end module ClassMethods def has_many(name) _relations[name] = { record_class_name: name.to_s.singularize.classify } end end end end
Version data entries
19 entries across 19 versions & 1 rubygems