summaryrefslogtreecommitdiff
path: root/users/app/controllers/users_base_controller.rb
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-09-02 09:59:49 -0700
committerjessib <jessib@riseup.net>2013-09-02 09:59:49 -0700
commit6110093e939db07fd27fac7c28ddcd09a49e70ed (patch)
tree4393c3e8fcb2969b0bd21800bff7dd5a1fc9c3d7 /users/app/controllers/users_base_controller.rb
parent060e06daa065f02b811dfe12850b101a62c12c8d (diff)
parent77af7ac953fb22c181056e8c40c8749d12a63922 (diff)
Merge pull request #74 from azul/refactor/finding-users
there's no need for User#find_by_param. clean it up
Diffstat (limited to 'users/app/controllers/users_base_controller.rb')
-rw-r--r--users/app/controllers/users_base_controller.rb2
1 files changed, 1 insertions, 1 deletions
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