Skip to main content

Module helper

Module helper 

Source
Expand description

Controller helpers โ€” auxiliary modules imported by controllers.

Helpers live in app/helpers/ (e.g. posts_helper.rs with PostsHelper). Mark the struct with #[helper] and call its methods from controller actions.

Traitsยง

Helper
A controller helper type. The #[helper] attribute generates the implementation from the struct name (PostsHelper โ†’ "posts_helper").