usman azmat
usman azmat

Reputation: 17

No route matches {:action=>"show", :controller=>"admin/users"}, missing required keys: [:id]

method in my my controller is

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

Upvotes: 0

Views: 58

Answers (1)

Hussain Bhatti
Hussain Bhatti

Reputation: 86

this should work

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

Upvotes: 2

Related Questions