lib/trax/model.rb in trax_model-0.0.98 vs lib/trax/model.rb in trax_model-0.0.99

- old
+ new

@@ -2,11 +2,10 @@ require 'default_value_for' require 'hashie/dash' require 'hashie/mash' require 'hashie/trash' require 'hashie/extensions/dash/indifferent_access' -require 'simple_enum' require_relative './validators/boolean_validator' require_relative './validators/email_validator' require_relative './validators/frozen_validator' require_relative './validators/future_validator' require_relative './validators/subdomain_validator' @@ -22,27 +21,20 @@ extend ::ActiveSupport::Concern extend ::ActiveSupport::Autoload autoload :Attributes autoload :Config - autoload :Enum + autoload :CoreExtensions + autoload :ExtensionsFor autoload :Errors - autoload :Freezable autoload :Registry autoload :UUID autoload :UUIDPrefix - autoload :UniqueId autoload :Matchable autoload :Mixin autoload :Mixins - autoload :MTI - autoload :Restorable autoload :Railtie - autoload :STI - autoload :StringExtensions - autoload :Struct - autoload :StructExtensions autoload :Validators include ::Trax::Model::Matchable include ::ActiveModel::Dirty include ::Trax::Core::InheritanceHooks @@ -75,19 +67,17 @@ def self.root ::Pathname.new(::File.path(__FILE__)) end def self.eager_autoload_mixins! - ::Trax::Model::Attributes::Mixin - ::Trax::Model::Enum - ::Trax::Model::Freezable - ::Trax::Model::Restorable - ::Trax::Model::UniqueId ::Trax::Model::Mixins::FieldScopes + ::Trax::Model::Mixins::Freezable ::Trax::Model::Mixins::IdScopes + ::Trax::Model::Mixins::Restorable ::Trax::Model::Mixins::SortByScopes ::Trax::Model::Mixins::StiEnum + ::Trax::Model::Mixins::UniqueId end eager_autoload_mixins! def self.find_by_uuid(uuid) @@ -155,10 +145,10 @@ def trax_registry_key name.underscore end end - ::String.include(::Trax::Model::StringExtensions) + ::String.include(::Trax::Model::CoreExtensions::String) ::ActiveSupport.run_load_hooks(:trax_model, self) end end