From 9cc35f90f33ccca3d8d6fa3168ba5313e0817e59 Mon Sep 17 00:00:00 2001 From: nilsding Date: Fri, 28 Nov 2014 19:25:18 +0100 Subject: [PATCH] fixed delete button not showing up FOR REAL --- app/controllers/application_controller.rb | 2 +- app/helpers/application_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 994d1d5b..73c86b10 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -6,7 +6,7 @@ class ApplicationController < ActionController::Base before_filter :configure_permitted_parameters, if: :devise_controller? def privileged?(user) - (current_user == user && current_user.admin?) ? true : false + (current_user == user || current_user.admin?) ? true : false end protected diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 78773e32..87e82159 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -47,6 +47,6 @@ module ApplicationHelper end def privileged?(user) - (current_user == user && current_user.admin?) ? true : false + (current_user == user || current_user.admin?) ? true : false end end