Sha256: e63d0924ab5fabcbaefeb52a10687c7e148ee6e6a6a9a43bee13f551524d7fae

Contents?: true

Size: 464 Bytes

Versions: 49

Compression:

Stored size: 464 Bytes

Contents

# require "eitil_core/application_record/model_atts"

# require "eitil_core/railtie" to run the dynamic dispatch as an init hook during boot
require "eitil_core/railtie"

module EitilCore
  module ApplicationRecord
    module ModelAtts

      Eitil::ApplicationRecordModules << self

      def model_atts
        columns = self.columns_hash.keys.map(&:to_sym)
        reject  = %i( id updated_at created_at )
        columns - reject
      end

    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
eitil-2.0.8 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-2.0.7 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-2.0.6 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-2.0.5 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-2.0.4 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-2.0.3 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-2.0.2 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-2.0.1 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-2.0.0 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-1.4.1 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-1.4.0 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-1.3.12 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-1.3.11 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-1.3.10 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-1.3.9 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-1.3.8 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-1.3.7 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-1.3.6 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-1.3.5 eitil_core/lib/eitil_core/application_record/model_atts.rb
eitil-1.3.4 eitil_core/lib/eitil_core/application_record/model_atts.rb