standard_port

standard_port() Instance Public methods Returns the standard port number for this request's protocol.

mattr_reader

mattr_reader(*syms) Instance Public methods Defines a class attribute and creates a class and instance reader methods. The underlying the class variable is set to nil, if it is not previously defined. module HairColors mattr_reader :hair_colors end HairColors.hair_colors # => nil HairColors.class_variable_set("@@hair_colors", [:brown, :black]) HairColors.hair_colors # => [:brown, :black] The attribute name must be a valid method name in Ruby. module Foo mattr_reader :"1

call

call(env) Class Public methods Makes the controller a Rack endpoint that runs the action in the given env's action_dispatch.request.path_parameters key.

define_method_attribute=

define_method_attribute=(attr_name) Instance Protected methods Defined for all datetime and timestamp attributes when time_zone_aware_attributes are enabled. This enhanced write method will automatically convert the time passed to it to the zone stored in Time.zone.

column_for_attribute

column_for_attribute(name) Instance Public methods Returns the column object for the named attribute. Returns nil if the named attribute not exists. class Person < ActiveRecord::Base end person = Person.new person.column_for_attribute(:name) # the result depends on the ConnectionAdapter # => #<ActiveRecord::ConnectionAdapters::SQLite3Column:0x007ff4ab083980 @name="name", @sql_type="varchar(255)", @null=true, ...> person.column_for_attribute(:nothing) # => nil

define_attribute_method

define_attribute_method(attr_name) Instance Public methods Declares an attribute that should be prefixed and suffixed by ActiveModel::AttributeMethods. To use, pass an attribute name (as string or symbol), be sure to declare define_attribute_method after you define any prefix, suffix or affix method, or they will not hook in. class Person include ActiveModel::AttributeMethods attr_accessor :name attribute_method_suffix '_short?' # Call to define_attribute_method must appe

define_attribute_methods

define_attribute_methods(*attr_names) Instance Public methods Declares the attributes that should be prefixed and suffixed by ActiveModel::AttributeMethods. To use, pass attribute names (as strings or symbols), be sure to declare define_attribute_methods after you define any prefix, suffix or affix methods, or they will not hook in. class Person include ActiveModel::AttributeMethods attr_accessor :name, :age, :address attribute_method_prefix 'clear_' # Call to define_attr

cookies

cookies() Instance Public methods Returns the response cookies, converted to a Hash of (name => value) pairs assert_equal 'AuthorOfNewPage', r.cookies['author']

indexes_per_table

indexes_per_table() Instance Public methods Returns the maximum number of indexes per table.

store

store(store_attribute, options = {}) Instance Public methods