From 7bb1a16d4eee3eb3ef36c6f5b4fc7968e3da7dd6 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 28 Aug 2013 11:53:58 +0200 Subject: there's no need for User#find_by_param. clean it up --- users/app/controllers/users_base_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/app/controllers') diff --git a/users/app/controllers/users_base_controller.rb b/users/app/controllers/users_base_controller.rb index dc2fa16..9becf0d 100644 --- a/users/app/controllers/users_base_controller.rb +++ b/users/app/controllers/users_base_controller.rb @@ -7,7 +7,7 @@ class UsersBaseController < ApplicationController protected def fetch_user - @user = User.find_by_param(params[:user_id] || params[:id]) + @user = User.find(params[:user_id] || params[:id]) if !@user && admin? redirect_to users_url, :alert => t(:no_such_thing, :thing => 'user') elsif !admin? && @user != current_user -- cgit v1.2.3