Sha256: 65ef2b9ab0e268e3c974b3b0c63b515d4157796753d396b15ed39607454e511f
Contents?: true
Size: 477 Bytes
Versions: 2
Compression:
Stored size: 477 Bytes
Contents
# frozen_string_literal: true module ActiveFields # Mix-in that allows ActiveRecord models to enable active fields module HasActiveFields extend ActiveSupport::Concern class_methods do attr_reader :active_fields_config def has_active_fields(types: ActiveFields.config.type_names) include CustomizableConcern @active_fields_config = CustomizableConfig.new(self) @active_fields_config.types = types end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_fields-1.1.0 | lib/active_fields/has_active_fields.rb |
active_fields-1.0.0 | lib/active_fields/has_active_fields.rb |