Refactor comments_controller. Instead of specifying current_user.id did
current_user.

Deleted flash.now because it was not needed. Previously added debug
flash message with capybara
Refactor Groups Controller. Took duplicates out, made data query faster
by using @groups.current_user.groups.build(group_params) instead of
@groups.new(group_params)

It's because the latter didn't do any query and needs to find user_id on
top of the group
Refactor mygroup method in groups controller.

There was no need to create an instance variable
Fix join and leave group membership actions. Before user was calling
join through Group controller to call a instance class in Membership
model.

Now the user calls the Membership controller to call the Membership
model to join and leave groups
Fix leave group function
Fix join group relationship on how it should be passed to the membership
controller.

Decided to nest membership into group because membership only exists in
terms of group
Fix unconventional routing from Group controller to Membership model to
save groups and user.

Fix all failing test because of this new change
Refactor PostsController
1) old school hash :id => 'code' to id: 'code'
2) The create method. From querying from Post.new(post_params) to
current_user.posts.build(post_params)

This resulted in a 174 times faster INSERT into SQL. (69.9ms => 0.4ms)
Refactor how membership is deleted. Previously it was being done in the
Membership model. Now there is a destroy method in MembershipController
that handles the deletion
Add dependent between Group and post. If group gets deleted all posts
should be deleted as well
Upload images automatically. This needs to be fixed to stop
Potential fix to app continuously loading and saving test images.
Fix deleted all images generated by test
Merge branch 'master' of github.com:jmoon90/studygroup into improve_group_function

Conflicts:
	app/models/membership.rb
	spec/features/user_joins_group_spec.rb
	spec/models/group_spec.rb
Fix Bug in group controller with size not being set. Added size to
post_params white list
Add sort method in group controller and routes for sort
Create sort button need to write test
Add test sort button in group index page.
Fix css of group views
Change success message when creating groups