method

string_to_cidr

rails latest stable - Class: ActiveRecord::ConnectionAdapters::PostgreSQLColumn::Cast

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.1.8) is shown here.

string_to_cidr(string)
public

No documentation available.

# File activerecord/lib/active_record/connection_adapters/postgresql/cast.rb, line 99
        def string_to_cidr(string)
          if string.nil?
            nil
          elsif String === string
            begin
              IPAddr.new(string)
            rescue ArgumentError
              nil
            end
          else
            string
          end
        end