Writing directly to the database

This is a terrible idea.

Why do you think this is easier then either using the API or running Rails commands to create posts?