rails / actiontext Goto Github PK
View Code? Open in Web Editor NEWEdit and display rich text in Rails applications
Edit and display rich text in Rails applications
Hey guys,
I did a test on rails 5.2.0 and I had a partial result using:
And the ActionText complain:
Missing partial action_text/attachables/_remote_image with {:locale=>[:en], :formats=>[:html, :text, :js, :css, :ics, :csv, :vcf, :vtt, :png, :jpeg, :gif, :bmp, :tiff, :svg, :mpeg, :mp3, :ogg, :m4a, :webm, :mp4, :otf, :ttf, :woff, :woff2, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip, :gzip], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}. Searched in:
Image galleries display…
Along the same lines as rails/rails#33741 (feel free to close if too similar)
However I'm thinking there will be some actiontext specific changes required as well.
class Note < ApplicationRecord
has_rich_text :content
end
With a model like this, I should be able to use a simple validation like
validates_presence_of :content
Need to write a custom validation. Here's what I came up with:
validate :has_content
def has_content
unless content&.body&.present?
errors.add(:content, "Can't be blank")
end
end
Rails 5.2.1
Ruby 2.5.1
As part of the Rails framework, I think the particular frontend text editor should be configurable. There's enough plumbing in ActionText to be valuable for every WYSIWYG editor, such as the action_text_rich_blogs
table for baked content, the ActiveStorage integration and the other conveniences provided by the framework. The Trix editor is just but one component.
For example, one should be able to selected Quill as their editor of choice in the configuration file:
config.action_text.editor = :quill
This would then instantiate the Quill editor for any forms built with the f.rich_text_area
helper.
I've browsed through the source code and have a decent idea of what would need to change in order to support something like Quill, but I'm unfamiliar with the best practices with making a configurable framework like this.
I'm happy to take a stab at the code if someone were willing to help guide me along the way with what would need to change to make this happen and get accepted.
Thanks.
I found this new feature really interesting for chat feature developing as it also make use of ActiveStorage.
I tried to make it work on a API case but I founded the problem that the :content
received at the controller is too specific to be generated by a frontend:
<div>
<figure data-trix-attachment=\“{"contentType":"image/jpeg","filename":"happy_frog.jpg","filesize":91211,"height":386,"sgid":"BAh7CEkiCGdpZAY6BkVUSSI3Z2lkOi8vYWN0aW9uLXRleHQvQWN0aXZlU3RvcmFnZTo6QmxvYi83P2V4cGlyZXNfaW4GOwBUSSIMcHVycG9zZQY7AFRJIg9hdHRhY2hhYmxlBjsAVEkiD2V4cGlyZXNfYXQGOwBUMA==--0861859ff592952a0f7d81387e24246d5816b26f","url":"http://localhost:3000/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--9ece563b8519d50276db4cf816538a712315615c/happy_frog.jpg","width":620}\” data-trix-content-type=\“image/jpeg\” data-trix-attributes=\“{"presentation":"gallery"}\” class=\“attachment attachment--preview attachment--jpg\“>
<img src=\“http://localhost:3000/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--9ece563b8519d50276db4cf816538a712315615c/happy_frog.jpg\” width=\“620\” height=\“386\“>
<figcaption class=\“attachment__caption\“>
<span class=\“attachment__name\“>happy_frog.jpg</span>
<span class=\“attachment__size\“>89.07 KB</span>
</figcaption>
</figure>
</div>
So, is there any plan to standardize it? or maybe introduce any option to install it like `rails action_text:install --api`` ?
I would be more than happy to lend a hand or even propose a pr, but first want to hear about the community due to being a couple of different ways to solve this
Hi, I love the idea of actiontext.
I looked into our own RTE implementation and found a use case that is not supported yet:
Embedding of external videos.
UseCase: I want to write a blog post and add a youtube or vimeo video.
Ideally, I would want to see a preview of the video in my editor - same as with images.
The way we do it right now: Authors can paste a video URL in the editor. Once we save the content we use oembed to change the URL to the preview-snipped. We then save both, the original text and the output-text which includes the youtube (…) video-snipped. We then display the output-text.
This process would still work with actiontext/trix, but it's not on the same level as working with images.
Are there other ways to handle this within actiontext?
Native support for embedding of external videos?
Or an api that allows to handle the trix-ui-part (paste, display a preview) and rendering part?
Thanks
I just installed wanted to test drive Rails version: 6.0.0.alpha
(Ruby version: 2.5.3 (x86_64-darwin18)) and followed this guide to try out action text:
https://dev.to/adrienpoly/step-by-step-guide-to-test-rails-activetext-4b8o
Trix including image upload works but I have to throw out this line:
Otherwise I get the following error:
couldn't find file 'trix/dist/trix' with type 'text/css'
Checked in these paths:
/Users/bijan/Desktop/yabe/yabe6/app/assets/config
/Users/bijan/Desktop/yabe/yabe6/app/assets/images
/Users/bijan/Desktop/yabe/yabe6/app/assets/stylesheets
/Users/bijan/.asdf/installs/ruby/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/rails-1cc46865ecfe/actioncable/app/assets/javascripts
/Users/bijan/.asdf/installs/ruby/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/rails-1cc46865ecfe/activestorage/app/assets/javascripts
/Users/bijan/.asdf/installs/ruby/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/rails-1cc46865ecfe/actionview/app/assets/javascripts
/Users/bijan/.asdf/installs/ruby/2.5.3/lib/ruby/gems/2.5.0/gems/turbolinks-source-5.2.0/lib/assets/javascripts
So Trix is unfortunately completely unstyled. Am I missing something?
I know action_text doesn't support Rails 5.2.1 (and depends on Rails 6.0.x).
That said, with minimal work, it's working 99% in Rails 5.2.1 and now the only issue I'm running into is in a very specific scenario (below), and I was wondering if anyone here knows whether it's related to reliance on a specific update in Rails 6 (related to ActiveStorage or ActiveRecord) that I could patch in to make it work in Rails 5.2.1:
Environment
<%= image_tag blob.representation({})
Issue
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_active_storage_attachments_uniqueness" DETAIL: Key (record_type, record_id, name, blob_id)=(ActionText::RichText, 349d05dd-cc7c-4e51-973d-24ff9e382e10, embeds, 1e794d34-6a14-4a80-9aeb-d31e6e1a1494) already exists. : INSERT INTO "active_storage_attachments" ("name", "record_id", "record_type", "blob_id", "created_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"
This does NOT happen in Rails 6.0.0.alpha. This DOES happen in Rails 5.2.1 without uuid's and without postgres.
It looks like it's trying to re-upload the image, even though it's already been uploaded.
I realize this is not a bug, so I'm sorry to clog up issues, but if anyone knows off the top of their head why this might be happening in Rails 5.2.1 (and not with Rails 6.0.0.alpha), I would deeply appreciate some help!
Thanks!!
Hello everyone!
First of all, thanks for creating this gem and deciding to include it in Rails 6 🎉 🙏
Yesterday while I was watching @dhh 's demo video I decided to follow the steps to try ActionText myself. By doing this I luckily forgot to add the following has_rich_text
class method to Post:
class Post < ApplicationRecord
has_rich_text :content
end
The consequence was that when I tried to render the form with the rich text editor I got the following error:
ActionView::Template::Error (undefined method `body' for nil:NilClass):
17: </div>
18:
19: <div class="field">
20: <%= form.rich_text_area :content %>
21: </div>
22:
23: <div class="actions">
I would like to submit a patch that would make ActionText able to suggest the user that the has_rich_text
class method for :content
in the Post
model may need to be added. Would you be happy with that?
Thanks in advance!
Right now they're hard-coded to 1024x768
: https://github.com/basecamp/actiontext/blob/a4af9580d604221ec36d2cd5671eb7f256ae5173/app/views/active_storage/blobs/_blob.html.erb#L2-L6
They also don't havewidth
, height
, or srcset
attributes.
Our user base is not used to drag and drop as an action to add images to RTE-areas.
Therefore, we have a toolbar button to "add image".
I suggest adding such a button to the default setup in action text so there is a clear affordance that shows me how to add a picture.
This might be solved in a way I did not understand yet.
But just in case it is not, here is my use case:
In my mind, using actiontext in an app that is behind a login (eg basecamp) is different from using it publicly, eg to create a public blog post or edit a public profile description.
The main difference is the importance of "truly" deleting an image.
UseCase
However, I assume this does not trigger the deletion of the image itself in the cloud. Which in this use case is required to really comply with eg privacy laws.
A sub-case for this would be to upload images in trix but then abandon the post (not click save). I am not sure if the image is already in the cloud, but if it is, its a similar problem: How do I get rid of it. However, in this case its less urgent since the image was not public yet; its just an image I want deleted that is on someones cloud storage, somewhere.
Based on this, I wonder …
Thanks
Hello,
I like the inclusion of a rich-text editor in rails by default.
One issue I'd like to raise is internationalization/translations. I've been using the globalize
gem to save translation records for fields on models that have translations. Now I was wondering if this will work for rich text fields, too.
Many users will at some point render the saved content outside of the editor itself. In this case it becomes crucial that the saved HTML does not contain any scripts
or other security vulnerabilities. Does ActionText do any form of validation on the saved html? If not, malicious users could take advantage of the exposed API and inject <script>
tags.
The sanitize gem may be of use here!
When I try to updating content of ActionText without attachment, it works properly.
But if the content have an image, I can't add text or image to content of ActionText.
After remove attached image, it updated correctly.
Below is information for more detailed.
Thank you.
When updating without attachment
(0.5ms) begin transaction
↳ app/controllers/articles_controller.rb:26
ActionText::RichText Load (0.6ms) SELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = ? AND "action_text_rich_texts"."record_type" = ? AND "action_text_rich_texts"."name" = ? LIMIT ? [["record_id", 8], ["record_type", "Article"], ["name", "content"], ["LIMIT", 1]]
↳ /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/lib/action_text/attribute.rb:29
User Load (14.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
↳ app/controllers/articles_controller.rb:26
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (24.5ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (7.1ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (29.6ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (2.5ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (6.5ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (2.0ms)
ActionText::RichText Update (5.6ms) UPDATE "action_text_rich_texts" SET "body" = ?, "updated_at" = ? WHERE "action_text_rich_texts"."id" = ? [["body", "TESTTESTTEST"], ["updated_at", "2018-11-29 08:09:49.961947"], ["id", 2]]
↳ /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/lib/action_text/attribute.rb:43
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (6.0ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (2.9ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (4.6ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (3.5ms)
Article Update (0.3ms) UPDATE "articles" SET "updated_at" = ? WHERE "articles"."id" = ? [["updated_at", "2018-11-29 08:09:50.760540"], ["id", 8]]
↳ app/controllers/articles_controller.rb:26
(2.0ms) commit transaction
When containing image
posted parameter
"content"=>"<div><figure data-trix-attachment=\"{"contentType":"image","height":705,"url":"http://localhost:3000/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f86e2d4ddbecd7cc3594c6b288e860405343f302/image.png","width":1253}\" data-trix-content-type=\"image\" class=\"attachment attachment--preview\"><img src=\"http://localhost:3000/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f86e2d4ddbecd7cc3594c6b288e860405343f302/image.png\" width=\"1253\" height=\"705\"><figcaption class=\"attachment__caption\"></figcaption></figure><br><br>TESTTESTTEST</div>"
SQL transaction
(0.7ms) begin transaction
↳ app/controllers/articles_controller.rb:26
ActionText::RichText Load (0.8ms) SELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = ? AND "action_text_rich_texts"."record_type" = ? AND "action_text_rich_texts"."name" = ? LIMIT ? [["record_id", 11], ["record_type", "Article"], ["name", "content"], ["LIMIT", 1]]
↳ /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/lib/action_text/attribute.rb:29
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
↳ app/controllers/articles_controller.rb:26
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/attachables/_remote_image.html.erb (3.9ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (154.5ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/attachables/_remote_image.html.erb (0.2ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (147.0ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/attachables/_remote_image.html.erb (0.2ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (141.5ms)
(0.1ms) commit transaction
When deleting image
(0.2ms) begin transaction
↳ app/controllers/articles_controller.rb:26
ActionText::RichText Load (0.4ms) SELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = ? AND "action_text_rich_texts"."record_type" = ? AND "action_text_rich_texts"."name" = ? LIMIT ? [["record_id", 10], ["record_type", "Article"], ["name", "content"], ["LIMIT", 1]]
↳ /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/lib/action_text/attribute.rb:29
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
↳ app/controllers/articles_controller.rb:26
ActiveStorage::Blob Load (0.3ms) SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]]
↳ /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/lib/action_text/attachable.rb:24
Rendered active_storage/blobs/_blob.html.erb (2.0ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (73.9ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (0.1ms)
CACHE ActiveStorage::Blob Load (0.0ms) SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]]
↳ /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/lib/action_text/attachable.rb:24
Rendered active_storage/blobs/_blob.html.erb (0.8ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (66.7ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (0.2ms)
CACHE ActiveStorage::Blob Load (0.0ms) SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]]
↳ /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/lib/action_text/attachable.rb:24
Rendered active_storage/blobs/_blob.html.erb (0.7ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (65.0ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (0.2ms)
ActionText::RichText Update (1.0ms) UPDATE "action_text_rich_texts" SET "body" = ?, "updated_at" = ? WHERE "action_text_rich_texts"."id" = ? [["body", ""], ["updated_at", "2018-11-29 08:17:38.915927"], ["id", 5]]
↳ /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/lib/action_text/attribute.rb:43
ActiveStorage::Blob Load (0.2ms) SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]]
↳ /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/lib/action_text/attachable.rb:24
Rendered active_storage/blobs/_blob.html.erb (0.7ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (68.4ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (0.1ms)
CACHE ActiveStorage::Blob Load (0.0ms) SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]]
↳ /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/lib/action_text/attachable.rb:24
Rendered active_storage/blobs/_blob.html.erb (0.8ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (62.0ms)
Rendered /Users/hyunkiahn/.rvm/gems/ruby-2.5.1/bundler/gems/actiontext-18974137be2c/app/views/action_text/content/_layout.html.erb (0.1ms)
Article Update (0.3ms) UPDATE "articles" SET "updated_at" = ? WHERE "articles"."id" = ? [["updated_at", "2018-11-29 08:17:39.857448"], ["id", 10]]
↳ app/controllers/articles_controller.rb:26
(1.0ms) commit transaction
When rendering the content - each of the embedded blobs is individually loaded via the GlobalID::Locator
- ignoring an preloaded values from with_rich_text_#{name}_and_embeds
.
If the attachments are inside a gallery they seem to be loaded multiple time.
Failing test (requires some query assertions copied from ActiveRecord).
test "with preloaded embeds it doesn't N+1 query" do
ActiveStorage::Current.host = "http://localhost:3000"
attachables = [create_file_blob(filename: "racecar.jpg", content_type: "image/jpg"), create_file_blob(filename: "racecar.jpg", content_type: "image/jpg")]
html = attachables.map{ |attachable|
<<~HTML
<action-text-attachment sgid="#{attachable.attachable_sgid}" content-type="image/jpg" previewable="true" presentation="gallery" filename="racecar.jpg" url=#{attachable.service_url} filesize="418099" width="649" height="647" ></action-text-attachment>
HTML
}.join
message = Message.create!(subject: "Greetings", content: "<div>#{html}</div>")
message = Message.with_rich_text_content_and_embeds.find(message.id)
sleep 1 # Wait for background processing
assert_no_queries do
message.content.to_s
end
end
Failure:
ActionText::ModelTest#test_with_preloaded_embeds_it_doesn't_N+1_query [/Users/lsylvester/Rails/actiontext/test/unit/model_test.rb:46]:
6 instead of 0 queries were executed.
Queries:
SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ?
SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ?
SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ?
SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ?
SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ?
SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ?.
Expected: 0
Actual: 6
Code for this test is at https://github.com/lsylvester/actiontext/tree/unnecessary-queries-test but it is not ready for a PR.
Hello,
I am having troubles when I want to add pictures.
There is no issue when I copy paste a picture directly in the text editor. However when I try to drag and drop a picture from a folder, it raises an error in ActiveStorage::DirectUploadsController line 19 with the error NoMethodError - undefined method 'url_expires_in' for nil:NilClass:
Any idea of where it can come from?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.