Unnest uploads controller

This commit is contained in:
Jose Farias
2024-11-29 17:05:32 -06:00
parent 0e8d4104f8
commit 6164da2e38
5 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ module ActionText
def markdown_area(record, name, value: nil, data: {}, **options)
field_name = "#{record.class.model_name.param_key}[#{name}]"
value = record.safe_markdown_attribute(name).content.to_s if value.nil?
data = data.reverse_merge! uploads_url: action_text_markdown_uploads_url(format: "json")
data = data.reverse_merge! uploads_url: uploads_url(format: "json")
tag.house_md value, name: field_name, data: data, **options
end
+1 -1
View File
@@ -6,7 +6,7 @@ module ActiveStorage::Sluggable
end
def slug_url(host: ActiveStorage::Current.url_options[:host], port: ActiveStorage::Current.url_options[:port])
Rails.application.routes.url_helpers.action_text_markdown_upload_url(slug, host: host, port: port)
Rails.application.routes.url_helpers.upload_url(slug, host: host, port: port)
end
private