Sha256: 95bd8423963206320484e75bdaaee33624e9adbb84453a049f7eaaeed3b1bfbb

Contents?: true

Size: 526 Bytes

Versions: 5

Compression:

Stored size: 526 Bytes

Contents

require 'active_support/concern'

module Journey::Resource::AttributeLoading
  extend ActiveSupport::Concern

  included do
    # uses defined setters in place of attributes[key] where possible,
    # for the purpose of enums
    def load(attributes, remove_root = false, persisted = false)
      super(attributes, remove_root, persisted).tap do |x|
        # send each ENUM
        # self.attributes.each do |key, value|
        #   send("#{key}=", value) if respond_to?("#{key}=")
        # end
      end
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
embark-journey-0.0.16 lib/journey/resource/attribute_loading.rb
embark-journey-0.0.15 lib/journey/resource/attribute_loading.rb
embark-journey-0.0.14 lib/journey/resource/attribute_loading.rb
embark-journey-0.0.13 lib/journey/resource/attribute_loading.rb
embark-journey-0.0.12 lib/journey/resource/attribute_loading.rb