app/controllers/users_controller.rb
# show user's profile based on the ID, if not logged in the redirect to login
show user's profile based on the ID, if not logged in the redirect to login
show user ' s profile based on the ID if not logged in the redirect to login
def show
    id = params[:id]
    @user = User.find(id)
    if (@user.type == "Admin")
      redirect_to admin_path params
    elsif (@user.type == "Staff")
      redirect_to staff_path params
    else (@user.type == "Partner")
      redirect_to partner_path params
    end
  end
def show id = params [ :id ] @user = User . find ( id ) if ( @user . type == "Admin" ) redirect_to admin_path params elsif ( @user . type == "Staff" ) redirect_to staff_path params else ( @user . type == "Partner" ) redirect_to partner_path params end end
show user's profile based on the ID, if not logged in the redirect to login
show user ' s profile based on the ID if not logged in the redirect to login