0

I'd like to monkey patch this method: https://github.com/rails/rails/blob/1ab0e6b6d8070f30b2a02254070c6dd07fa56ec4/actiontext/app/helpers/action_text/tag_helper.rb#L21

to exclude the two lines:

      options[:data][:direct_upload_url] = main_app.rails_direct_uploads_url
      options[:data][:blob_url_template] = main_app.rails_service_blob_url(":signed_id", ":filename")

I'm not using ActiveStorage with ActionText and I've excluded the ActiveStorage routes from being drawn. Hence these lines are causing an exception. I can't figure out how I can monkey patch this method to exclude those lines.

Would be grateful for any help :)

ayushn21
  • 305
  • 2
  • 7
  • Does this answer your question? [Where to put code when monkey patching](https://stackoverflow.com/questions/41705391/where-to-put-code-when-monkey-patching) – Eyeslandic May 19 '20 at 09:01
  • I tried that strategy already but unfortunately it didn't work. The original code was still called :( – ayushn21 May 19 '20 at 13:19

0 Answers0