validates_format_of

validates_format_of(*attr_names) Instance Public methods Validates whether the value of the specified attribute is of the correct form, going by the regular expression provided.You can require that the attribute matches the regular expression: class Person < ActiveRecord::Base validates_format_of :email, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, on: :create end Alternatively, you can require that the specified attribute does not match the regular expression: class

add_listener

add_listener( listener ) Instance Public methods

set_content_type

set_content_type(m, user_content_type, class_default) Instance Protected methods Used by mail to set the content type of the message. It will use the given user_content_type, or multipart if the mail message has any attachments. If the attachments are inline, the content type will be âmultipart/relatedâ, otherwise âmultipart/mixedâ. If there is no content type passed in via headers, and there are no attachments, or the message is multipart, then the default content type is used.

share_stdio 2

share_stdio(dist, src = '') Instance Public methods

new

new(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil) Class Public methods Creates a new Net::HTTP object without opening a TCP connection or HTTP session. The address should be a DNS hostname or IP address, the port is the port the server operates on. If no port is given the default port for HTTP or HTTPS is used. If none of the p_ arguments are given, the proxy host and port are taken from the http_proxy environment variable (or its uppercase equivale

rename_table

rename_table(table_name, new_name) Instance Public methods Renames a table. Example: rename_table('octopuses', 'octopi')

eql_with_coercion

eql_with_coercion(other) Instance Public methods Layers additional behavior on #eql? so that ActiveSupport::TimeWithZone instances can be eql? to an equivalent Time eql?

name

enc.name â string Instance Public methods Returns the name of the encoding. Encoding::UTF_8.name #=> "UTF-8"

to_spec

to_spec() Instance Public methods DOC: this method needs either documented or :nodoc'd

active?

active?() Instance Public methods CONNECTION MANAGEMENT ====================================