Sha256: 30ce17fdfb45177e035ae925df32c508750f9ae01585b50224e2510646602f61

Contents?: true

Size: 876 Bytes

Versions: 165

Compression:

Stored size: 876 Bytes

Contents

# frozen_string_literal: true

module Motor
  module ActiveRecordUtils
    module ActiveStorageBlobPatch
      KEYWORD_ARGS =
        %i[io filename content_type metadata service_name identify record].freeze

      def build_after_upload(hash)
        super(**hash.with_indifferent_access.slice(*KEYWORD_ARGS).symbolize_keys)
      end

      def build_after_unfurling(hash)
        super(**hash.with_indifferent_access.slice(*KEYWORD_ARGS).symbolize_keys)
      end

      def create_after_upload!(hash)
        super(**hash.with_indifferent_access.slice(*KEYWORD_ARGS).symbolize_keys)
      end

      def create_after_unfurling!(hash)
        super(**hash.with_indifferent_access.slice(*KEYWORD_ARGS).symbolize_keys)
      end

      def create_and_upload!(hash)
        super(**hash.with_indifferent_access.slice(*KEYWORD_ARGS).symbolize_keys)
      end
    end
  end
end

Version data entries

165 entries across 165 versions & 7 rubygems

Version Path
motor-admin-0.4.34 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.4.33 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.4.32 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.4.31 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.4.30 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.4.29 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.4.28 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-cstham8-0.4.35 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-cstham8-0.4.34 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-cstham8-0.4.33 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-cstham8-0.4.32 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-cstham8-0.4.31 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-cstham8-0.4.30 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-cstham8-0.4.29 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-cstham8-0.4.28 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-cstham8-0.4.27 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.4.27 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-unosquare-0.4.28 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-unosquare-0.4.27 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-pz-0.4.26 lib/motor/active_record_utils/active_storage_blob_patch.rb