Skip to content

Chapter 3 code complete. CableReady for job updates, not Turbo Streams#4

Merged
DavidColby merged 2 commits intofinalfrom
chapter-3
Jan 23, 2022
Merged

Chapter 3 code complete. CableReady for job updates, not Turbo Streams#4
DavidColby merged 2 commits intofinalfrom
chapter-3

Conversation

@DavidColby
Copy link
Copy Markdown
Owner

No description provided.

@DavidColby DavidColby merged commit 09ba4b3 into final Jan 23, 2022
@mantasgudauskas-mg
Copy link
Copy Markdown

In the /app/javascript/application.js, there is a need to adjust the header by using the mimeType option.

From:

mrujs.start({ plugins: [ new CableCar(CableReady) ] })

To:

mrujs.start({ plugins: [ new CableCar(CableReady, { mimeType: "application/vnd.cable-ready.json" }) ] })

Otherwise, mrujs (^1.0.0), won't be able to execute on the json payload provided by CableCar.

Therefore, the form fields can't be loaded in the slideover.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants