Skip to content

Commit

Permalink
#56 documentation modified @bassemmagdy
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaHany94 committed Apr 8, 2015
1 parent 26806de commit ad55c55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/controllers/magazines_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ def check_for_cancel
redirect_to @magazine
end

# Request joining a magazine
def join
#Author:Mina Hany
#4.4.2015
#A hash is created containing user's id who wants to join a magazine
#and that magazine's id and it is added to model contaioning joining requests
joinh = { "user_id" => current_user.id, "magazine_id" => params[:id] }
Requestjoiningmagazine.create(joinh)
@magazine = Magazine.find(params[:id])
Expand Down

0 comments on commit ad55c55

Please sign in to comment.