Sha256: 85ecc69365364d924c613a53a9055df216bc7921eb2550d2bce1f29e57b490e9
Contents?: true
Size: 387 Bytes
Versions: 8
Compression:
Stored size: 387 Bytes
Contents
module Landable module TableName extend ActiveSupport::Concern included do schema = "#{Landable.configuration.database_schema_prefix}landable" suffix = parent.name.demodulize.downcase schema += "_#{suffix}" unless suffix == "landable" model_name = self.model_name.element.pluralize self.table_name = "#{schema}.#{model_name}" end end end
Version data entries
8 entries across 8 versions & 1 rubygems