how to get the message from validates_presence_of

In your view you need to include the error_messages_for method.
This takes a string argument that is the name of an instance variable.

in contoller #=> fails due to errors

in view

error_messages_for “thing”

You can have as many calls to error_messages_for as you want in one view, for as many instance variables as you have.

The docs as have more in depth explainations.