没有路由匹配{:action =>“ show”,:controller =>“ admin / users”},缺少必需的键:[:id]

时间:2018-11-14 11:36:44

标签: ruby-on-rails

我的控制器中的方法是

def userDirections
  if user_signed_in?
    redirect_to admin_user_path(admin_user_url)
  else
    redirect_to new_user_session_path
  end
end

1 个答案:

答案 0 :(得分:2)

这应该有效

def userDirections
  if user_signed_in?
    redirect_to admin_user_path(current_user)
  else
    redirect_to new_user_session_path
  end
end