app/models/users/login_history.rb
def on_campus?
    %w(128.95 172.25 128.208 172.28 140.142 172.22).each do |subnet|
      return true if ip_in(subnet)
    end
    false
  end
# Returns true if the user request was generated from an on-campus IP address. Obviously, this should not be trusted, but it
# can be informational.
Returns true if the user request was generated from an on-campus IP address. Obviously, this should not be trusted, but it
can be informational.
Returns true if the user request was generated from an on - campus IP address . Obviously this should not be trusted but it can be informational .
def on_campus?
    %w(128.95 172.25 128.208 172.28 140.142 172.22).each do |subnet|
      return true if ip_in(subnet)
    end
    false
  end
def on_campus? %w( 128.95 172.25 128.208 172.28 140.142 172.22 ) . each do | subnet | return true if ip_in ( subnet ) end false end
Returns true if the user request was generated from an on-campus IP address.
Returns true if the user request was generated from an on - campus IP address .