I have a Post and Comment model. One post has many comments and one comment belongs to a post.
When showing an individual comment, how can I access the post that it belongs to?
i.e. in Ruby on Rails you could do:
@comment = Comment.find(params[:id])
@post = @comment.post
How could I achieve this using the Phoenix Elixir framework? I believe I have my model associations set up properly but I am confused on how to actually get this query in either the view or the controller.