From ad55c55eb9d33fa31462f7647fedce26b6b0164c Mon Sep 17 00:00:00 2001 From: MinaHany94 Date: Wed, 8 Apr 2015 23:47:26 +0200 Subject: [PATCH] #56 documentation modified @bassemmagdy --- app/controllers/magazines_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/magazines_controller.rb b/app/controllers/magazines_controller.rb index a8cebbf3..ea610bc9 100644 --- a/app/controllers/magazines_controller.rb +++ b/app/controllers/magazines_controller.rb @@ -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])