Sha256: b6025b13930436604f447957d77d8948d731ef589b278a919a2f83dacc67cd2b
Contents?: true
Size: 675 Bytes
Versions: 8
Compression:
Stored size: 675 Bytes
Contents
module ROM module Plugins module Relation module KeyInference # Infer foreign_key name for this relation # # TODO: this should be configurable and handled by an injected policy # # @return [Symbol] # # @api private def foreign_key :"#{Inflector.singularize(name)}_id" end # Return base name which defaults to name attribute # # @return [Symbol] # # @api private def base_name name end end end end end ROM.plugins do register :key_inference, ROM::Plugins::Relation::KeyInference, type: :relation end
Version data entries
8 entries across 8 versions & 2 rubygems