method

cidr_to_string

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.

cidr_to_string(object)
public

No documentation available.

# File activerecord/lib/active_record/connection_adapters/postgresql/cast.rb, line 113
        def cidr_to_string(object)
          if IPAddr === object
            "#{object.to_s}/#{object.instance_variable_get(:@mask_addr).to_s(2).count('1')}"
          else
            object
          end
        end