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
mafia-admin-0.3.15 lib/motor/active_record_utils/active_storage_blob_patch.rb
mafia-admin-0.3.14 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.14 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.13 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.12 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.11 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.10 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.9 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.8 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.7 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.6 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.5 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.4 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.3 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.2 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.1 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.3.0 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.2.89 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.2.88 lib/motor/active_record_utils/active_storage_blob_patch.rb
motor-admin-0.2.87 lib/motor/active_record_utils/active_storage_blob_patch.rb