Files
nairobi/app/models
Javi Martín 8c82ff290b Handle CKEditor attachments with Active Storage
The code is based on what's generated using CKEditor's code generator.

We're doing one minor change to the `Ckeditor::Backend::ActiveStorage`
module; we're assigning the data in a `before_validation` instead of a
`before_save` callback. Validations with `file_validations` didn't work
otherwise; it looks like this backend was written with
`active_storage_validations` in mind [1].

Note we don't need to update the `name` column in the attachments table
because, when using Active Storage, CKEditor uses both `data` (as
attribute accessor) and `storage_data` (as attachment attribute).

[1] https://github.com/galetahub/ckeditor/blob/f9e48420ccb6dc/lib/generators/ckeditor/templates/active_record/active_storage/ckeditor/picture.rb#L4
2022-02-23 18:21:38 +01:00
..
2021-12-30 14:45:48 +01:00
2021-08-16 16:31:04 +02:00
2021-03-02 13:15:15 +01:00
2021-10-01 16:19:10 +02:00
2021-12-30 15:50:02 +01:00
2021-04-08 17:23:30 +02:00
2019-03-27 15:22:14 +01:00
2021-12-30 14:45:48 +01:00
2021-04-13 13:52:18 +02:00
2019-10-23 14:39:31 +02:00
2019-03-14 17:25:43 +01:00
2019-04-29 13:08:43 -05:00
2021-12-30 14:45:48 +01:00
2020-12-02 12:13:02 +01:00
2021-12-16 13:57:00 +01:00
2020-04-09 07:11:53 +10:00
2021-08-16 16:31:04 +02:00
2021-08-16 16:31:04 +02:00
2021-08-16 16:31:04 +02:00
2019-10-25 19:29:12 +02:00
2022-02-21 18:47:13 +01:00
2017-12-15 19:21:02 +01:00
2021-01-12 14:50:37 +01:00