Module: Motor::ActiveRecordUtils::ActiveStorageBlobPatch
- Defined in:
- lib/motor/active_record_utils/active_storage_blob_patch.rb
Constant Summary collapse
- KEYWORD_ARGS =
%i[io filename content_type metadata service_name identify record].freeze
Instance Method Summary collapse
- #build_after_unfurling(hash) ⇒ Object
- #build_after_upload(hash) ⇒ Object
- #create_after_unfurling!(hash) ⇒ Object
- #create_after_upload!(hash) ⇒ Object
- #create_and_upload!(hash) ⇒ Object
Instance Method Details
#build_after_unfurling(hash) ⇒ Object
13 14 15 |
# File 'lib/motor/active_record_utils/active_storage_blob_patch.rb', line 13 def build_after_unfurling(hash) super(**hash.with_indifferent_access.slice(*KEYWORD_ARGS).symbolize_keys) end |
#build_after_upload(hash) ⇒ Object
9 10 11 |
# File 'lib/motor/active_record_utils/active_storage_blob_patch.rb', line 9 def build_after_upload(hash) super(**hash.with_indifferent_access.slice(*KEYWORD_ARGS).symbolize_keys) end |
#create_after_unfurling!(hash) ⇒ Object
21 22 23 |
# File 'lib/motor/active_record_utils/active_storage_blob_patch.rb', line 21 def create_after_unfurling!(hash) super(**hash.with_indifferent_access.slice(*KEYWORD_ARGS).symbolize_keys) end |
#create_after_upload!(hash) ⇒ Object
17 18 19 |
# File 'lib/motor/active_record_utils/active_storage_blob_patch.rb', line 17 def create_after_upload!(hash) super(**hash.with_indifferent_access.slice(*KEYWORD_ARGS).symbolize_keys) end |
#create_and_upload!(hash) ⇒ Object
25 26 27 |
# File 'lib/motor/active_record_utils/active_storage_blob_patch.rb', line 25 def create_and_upload!(hash) super(**hash.with_indifferent_access.slice(*KEYWORD_ARGS).symbolize_keys) end |