Controller for posts in Angular and Rails, angular-resource and Post resource