Sha256: f944d7745cfb9222df2287151ebb81ee6d286ef12ab5d6b1f0f5794df0cffaeb
Contents?: true
Size: 771 Bytes
Versions: 8
Compression:
Stored size: 771 Bytes
Contents
require "golden_fleece/model/context" require "golden_fleece/model/export" require "golden_fleece/model/normalization" require "golden_fleece/model/active_model/normalization" require "golden_fleece/model/active_model/validation" module GoldenFleece module Model def self.included(base) # Include ORM-specific modules depending on what ORM we're using orm = if defined? ::ActiveModel "ActiveModel" end orm_module = "GoldenFleece::Model::#{orm}".constantize base.class_eval do include GoldenFleece::Model::Context include GoldenFleece::Model::Export include GoldenFleece::Model::Normalization include orm_module::Normalization include orm_module::Validation end end end end
Version data entries
8 entries across 8 versions & 1 rubygems