Add relations to models.

Fix 'has_and_belongs_to_many' in 'swap.rb', and adds it in 'user.rb'.