This is good advice for debugging the problem – one step at a time – it’s often very helpful to put println
calls into your code to see what the data actually looks like at each place. Displaying {{item}}
in your template will probably also be helpful, since that will show what keys are available and their values.
Since you are seeing three Created
bullets, that tells you that messages
has three entries in it – so you’re getting expected amount of data but the three fields you are trying to display are not present with those names (so you’re getting nil
which Selmer renders as an empty string).
It might help you at this point to work through the Getting Started guide for next.jdbc
in a REPL session to see what the data looks like.