Rails Subnet Calculator