mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
remove some dynamic finders (they are deprecated for rails4) and add test for untested method of context.rb
This commit is contained in:
parent
402b078c02
commit
583664be36
4 changed files with 65 additions and 59 deletions
|
|
@ -193,7 +193,7 @@ class ApplicationController < ActionController::Base
|
|||
protected
|
||||
|
||||
def admin_login_required
|
||||
unless User.find_by_id_and_is_admin(session['user_id'], true)
|
||||
unless User.find(session['user_id']).is_admin
|
||||
render :text => t('errors.user_unauthorized'), :status => 401
|
||||
return false
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue