standard_port

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

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

attribute_method_affix

attribute_method_affix(*affixes) Instance Public methods Declares a method available for all attributes with the given prefix and suffix. Uses method_missing and respond_to? to rewrite the method. #{prefix}#{attr}#{suffix}(*args, &block) to #{prefix}attribute#{suffix}(#{attr}, *args, &block) An #{prefix}attribute#{suffix} instance method must exist and accept at least the attr argument. class Person include ActiveModel::AttributeMethods attr_accessor :name attribut