set up associations as has_and_belongs_to_many and created a join table migration for create_posts_categories