Sha256: bd3e4afe3fdfe8b6ba9f37544d2f14914ceacd88e907a9106e0870bc2c845630
Contents?: true
Size: 396 Bytes
Versions: 3
Compression:
Stored size: 396 Bytes
Contents
module HasMetaData if defined?(Rails::Railtie) require "rails" class Railtie < Rails::Railtie initializer "has_draft.extend_active_record" do ActiveSupport.on_load(:active_record) do HasMetaData::Railtie.insert end end end end class Railtie def self.insert ActiveRecord::Base.send(:include, HasMetaData) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
has_meta_data-1.2.0 | lib/has_meta_data/railtie.rb |
has_meta_data-1.1.0 | lib/has_meta_data/railtie.rb |
has_meta_data-1.0.0 | lib/has_meta_data/railtie.rb |