Miscellaneous
renderText()
Signature
Section titled “Signature”renderText() — returns any
Description
Section titled “Description”Instructs the controller to render specified text when it’s finished processing the action.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
text | any | yes | — | The text to be rendered. |
Examples
Section titled “Examples”// Render just the text "Done!" to the client
renderText("Done!");
// Render serialized product data to the client
products = model("product").findAll();
renderText(SerializeJson(products));