If a function returns a string it does not require a view.
On Oct 24, 7:18 am, Luther Goh Lu Feng <elf...@yahoo.com> wrote: > If I have a function that I intend to call from different controllers, but I > have no need for the function to have a view, where should this function be > defined? eg. a function that simply calculates the outcome of a math formula, > and several controllers will call this function to display the result. > > Should it be defined within a controller, or elsewhere?