From 47b80c3a5b8f81522cd4a0ed32903dd9f144ed43 Mon Sep 17 00:00:00 2001 From: sidharth Date: Sat, 12 Jan 2019 18:53:18 +0530 Subject: [PATCH 1/5] Multiple tag controller action accepts lists also now --- app/controllers/subscription_controller.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/controllers/subscription_controller.rb b/app/controllers/subscription_controller.rb index 05c56aac7e..0c58649373 100644 --- a/app/controllers/subscription_controller.rb +++ b/app/controllers/subscription_controller.rb @@ -122,8 +122,13 @@ def multiple_add unless params[:names] flash[:notice] = "Please enter tags for subscription in the url." redirect_to "/subscriptions" + "?_=" + Time.now.to_i.to_s + return + end + if params[:names].is_a? String + tag_list = params[:names].split(',') + else + tag_list = params[:names] end - tag_list = params[:names].split(',') # should be logged in to subscribe if current_user # assume tag, for now @@ -170,8 +175,8 @@ def multiple_add # user or node subscription end else - flash[:warning] = "You must be logged in to subscribe for email updates." - redirect_to "/login" + flash[:warning] = "You must be logged in to subscribe for email updates!" + redirect_to "/login?return_to=" + request.fullpath end end From 889652df4550b0c64384e88c0e47359438ff9da3 Mon Sep 17 00:00:00 2001 From: sidharth Date: Sat, 12 Jan 2019 18:58:08 +0530 Subject: [PATCH 2/5] Few minor changes --- app/views/tag/_tags.html.erb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/tag/_tags.html.erb b/app/views/tag/_tags.html.erb index 44c9ba2ce5..4aff9fdcdd 100644 --- a/app/views/tag/_tags.html.erb +++ b/app/views/tag/_tags.html.erb @@ -1,7 +1,6 @@