How to add a custom function through package?

Hi Team,

With reference from below URL, i have created one sample package with flash alert message.

But after installation and restart, am not getting the expected result in that route(“location”: “app/model/custom.rb”,).

Kindly share the more details about package, with how to add the custom function.

Thanks,
Sankara.S