Class: Motor::ActiveStorageAttachmentsController
- Inherits:
-
ApiBaseController
- Object
- ActionController::API
- ApiBaseController
- Motor::ActiveStorageAttachmentsController
- Includes:
- WrapIoParams
- Defined in:
- app/controllers/motor/active_storage_attachments_controller.rb
Instance Method Summary collapse
Methods included from CurrentAbility
Methods included from CurrentUserMethod
Instance Method Details
#create ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/motor/active_storage_attachments_controller.rb', line 11 def create if attachable?(record) record.public_send(@attachment.name).attach(file_params) head :ok else head :unprocessable_entity end end |