Fixed relational models in Rails. Also added in Rails Controller logic to pull messages from the database and serve them client-side