Patch #31205

Replace jquery-rails with vanilla javascript ujs

Added by Marius BALTEANU about 1 month ago. Updated 25 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Code cleanup/refactoring
Target version:4.1.0

Description

When the migration to Rails 5.2 was made, the "Unobtrusive JavaScript" was reverted to jquery-rails instead of vanilla js (#26518 for more details).

Because we cannot stick for ever with the old jquery-rails library, I've updated the ui-rails to the latest version and fixed in the proper way #26518.

I propose to commit this patch as soon as possible in order to have enough time to find another possible issues (I've tested roughly other screens that are using the remote feature and I didn't find other problems).

0001-Update-Rails-ujs.patch.zip (195 KB) Marius BALTEANU, 2019-04-18 17:27


Related issues

Related to Redmine - Defect #26518: Rails 5: Adding a block in My Page causes "Invalid form a... Closed

Associated revisions

Revision 18062
Added by Go MAEDA about 1 month ago

Update Rails ujs (#31205).

Patch by Marius BALTEANU.

History

#1 Updated by Marius BALTEANU about 1 month ago

  • Related to Defect #26518: Rails 5: Adding a block in My Page causes "Invalid form authenticity token." added

#2 Updated by Go MAEDA about 1 month ago

  • Status changed from New to Needs feedback
  • Assignee set to Marius BALTEANU

I see the following error after applying the patch:

Started GET "/javascripts/jquery-1.11.1-ui-1.11.0-ujs-5.2.3.js" for 127.0.0.1 at 2019-04-18 23:12:33 +0900

ActionController::RoutingError (No route matches [GET] "/javascripts/jquery-1.11.1-ui-1.11.0-ujs-5.2.3.js"):

#3 Updated by Marius BALTEANU about 1 month ago

Go MAEDA wrote:

I see the following error after applying the patch:

[...]

It is normal, I've attached an incomplete patch, sorry for that.

Please try the new one, it is zip because the patch size is greater than 600.

#4 Updated by Marius BALTEANU about 1 month ago

  • File deleted (0001-Update-Rails-ujs.patch)

#5 Updated by Go MAEDA about 1 month ago

  • Target version set to 4.1.0

Committed the patch. Thank you.

#6 Updated by Marius BALTEANU 25 days ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Please open new tickets for issues related to this change.

Also available in: Atom PDF