concept action in category scalatra

appears as: action, n action, ctions, ction, The action, actions
Scalatra in Action

This is an excerpt from Manning's book Scalatra in Action.

You can quickly make things look nicer by wrapping the page template in a layout that includes some boilerplate CSS. Open the layouts folder, and create a new file called default.ssp containing the contents of listing 2.6. By convention, Scalate will use this file as the layout for your pages/show.ssp template. It will wrap the contents of listing 2.6 around the HTML output of each of your controller’s actions, inserting the action’s output into the layout at the point where the layout says <%= unescape(body) %>.

Listing 4.19. ActionResult in action

The block of code inside a route matcher is called action code or an action. In a forms-based CRUD application, you might retrieve some data and then render a view inside the action. In an API, you might accept incoming data, use it to create a new object, and then return the newly created object as JSON. In either case, the action is where your application goes to work for you.