Sha256: 2c4485f79a5d37783367bdecded275a0c339c8e800ab9c780554327b86273031
Contents?: true
Size: 590 Bytes
Versions: 35
Compression:
Stored size: 590 Bytes
Contents
# frozen_string_literal: true module LinkedRails module Model module Tables extend ActiveSupport::Concern included do class_attribute :defined_columns end module ClassMethods def with_columns(opts) initialize_columns defined_columns.merge!(opts) end def initialize_columns return if defined_columns && method(:defined_columns).owner == singleton_class self.defined_columns = superclass.try(:defined_columns)&.dup || {}.with_indifferent_access end end end end end
Version data entries
35 entries across 35 versions & 1 rubygems