From 2fdcb5dcc5a74c1c1ffcf107af6402ac05a24040 Mon Sep 17 00:00:00 2001 From: Connoropolous Date: Tue, 18 Feb 2014 16:45:11 -0800 Subject: [PATCH] Update main_controller.rb realized these lines we're duplicated --- app/controllers/main_controller.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 61b49ba3..931f869d 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -71,12 +71,8 @@ class MainController < ApplicationController if !user @topics = Topic.where('LOWER("name") like ?', search).where('metacode_id = ?', filterByMetacode.id).order('"name"') - #read this next line as 'delete a topic if its private and you're either 1. logged out or 2. logged in but not the topic creator - @topics.delete_if {|t| t.permission == "private" && (!authenticated? || (authenticated? && @current.id != t.user_id)) } elsif user @topics = Topic.where('LOWER("name") like ?', search).where('metacode_id = ? AND user_id = ?', filterByMetacode.id, user).order('"name"') - #read this next line as 'delete a topic if its private and you're either 1. logged out or 2. logged in but not the topic creator - @topics.delete_if {|t| t.permission == "private" && (!authenticated? || (authenticated? && @current.id != t.user_id)) } end end elsif desc