I am sure that this is fine, except that you can get an error like "do not display the action twice" (if im admin is logged in, he will still try to display the default value after rendering the administrator's action)
class UsersController < ApplicationController
def index
if logged_in && is_admin
render 'admin_index'
else
render
end
end
end
could be better
source
share